React component som viser notifikasjoner for innlogget arbeidsgiver.
npm install --save @navikt/arbeidsgiver-notifikasjon-widget
import React, { Component } from 'react'
import {NotifikasjonWidget} from "@navikt/arbeidsgiver-notifikasjon-widget";
const miljø = gittMiljo<"local" | "dev" | "labs" | "prod">({
prod: 'prod',
labs: 'labs',
dev: 'dev',
other: 'local',
});
const Banner: FunctionComponent<RouteComponentProps & OwnProps> = ({history, sidetittel}) => {
return (
<Bedriftsmeny>
<NotifikasjonWidget miljo={miljø}/>
</Bedriftsmeny>
);
};
Fra og med versjon 6.5.2 er css lagt ut i egen fil. Denne må importeres i prosjektet som bruker widgeten.
F.eks:
import '@navikt/arbeidsgiver-notifikasjon-widget/lib/esm/index.css';
// eller
import '@navikt/arbeidsgiver-notifikasjon-widget/lib/cjs/index.css';
To run the demo app locally you need to run the three following scripts.
cd brukerapi-mock
npm i
npm run build
cd component
npm i
npm start
cd demo
npm i
npm start
cd component
npm run gql:cp_schema
npm run gql:generate
cd ../brukerapi-mock
npm build
MIT © navikt