Skip to content

Commit

Permalink
Bedriftsmeny v.7.0.0 (#136)
Browse files Browse the repository at this point in the history
* Fjerner ikoner og bruk av virksomhetsnr

* Fjerner piktogram og undertittel

* Ny padding og underlinje

* Major Bump

* Bredere bedriftsmeny

* Release versjon av bedriftsmeny
  • Loading branch information
ebelegu authored Oct 23, 2024
1 parent cc2d9c6 commit 5074c34
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 235 deletions.
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@navikt/bedriftsmeny",
"version": "6.13.2-rc2",
"version": "7.0.0",
"description": "Bedriftsvelger og -meny for innlogget arbeidsgiver. Laget av TAG (Tjenester for Arbeidsgivere).",
"author": "NAVIKT",
"license": "MIT",
Expand Down
10 changes: 0 additions & 10 deletions src/bedriftsmeny/Bedriftsmeny.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import Velger from './velger/Virksomhetsvelger';

interface EgneProps {
sidetittel?: string | JSX.Element;
undertittel?: string;
piktogram?: JSX.Element;
organisasjoner?: Organisasjon[];
onOrganisasjonChange?: (organisasjon: Organisasjon) => void;
/**
Expand All @@ -27,8 +25,6 @@ const Bedriftsmeny: FunctionComponent<EgneProps> = (props) => {
return (
<BedriftsmenyView
tittel={sidetittel}
undertittel={props.undertittel}
piktogram={props.piktogram}
virksomhetsvelger={<Virksomhetsvelger {...props} friKomponent={false} />}
bjelle={props.children}
/>
Expand Down Expand Up @@ -117,12 +113,6 @@ export const flatUtOrganisasjonstre = (organisasjonstre: Organisasjonstre[]): Or
return organisasjonstre.flatMap((o) => kutter(o));
};

export { Arbeidsforhold } from './piktogrammer/Arbeidsforhold';
export { AvtalerOmTiltak } from './piktogrammer/AvtalerOmTiltak';
export { ForebyggeSykefravaer } from './piktogrammer/ForebyggeSykefravaer';
export { Kandidater } from './piktogrammer/Kandidater';
export { Refusjon } from './piktogrammer/Refusjon';
export { MSAIkon } from './piktogrammer/MSAIkon';
export { hentAlleJuridiskeEnheter } from './hentAlleJuridiskeEnheter';
export type { Organisasjon } from './organisasjon';

Expand Down
30 changes: 3 additions & 27 deletions src/bedriftsmeny/BedriftsmenyView.css
Original file line number Diff line number Diff line change
@@ -1,32 +1,15 @@
.navbm-bedriftsmeny {
background-color: var(--a-bg-default);
border-bottom: 0.25rem solid var(--a-border-focus-on-inverted);
border-bottom: 1px solid var(--a-gray-300);
padding: 1rem;
}

@media (min-width: 48rem) {
.navbm-bedriftsmeny {
padding: 32px 16px 24px;
padding: 20px 16px;
}
}

.navbm-piktogram {
display: flex;
justify-content: flex-end;
margin: 0 32px 0 64px;
align-items: flex-start;
}

.navbm-piktogram > svg {
height: 52px;
width: 52px;
}

@media (max-width: 70.5rem) {
.navbm-piktogram {
display: none;
}
}

.navbm-innhold-header {
display: flex;
Expand Down Expand Up @@ -62,12 +45,5 @@
gap: 1rem;
align-items: center;
justify-content: flex-end;
max-width: 26.25rem;
}


@media (max-width: 420px) {
.navbm-widgets {
padding: 1rem 0 1rem 1rem;
}
max-width: 30rem;
}
14 changes: 1 addition & 13 deletions src/bedriftsmeny/BedriftsmenyView.tsx
Original file line number Diff line number Diff line change
@@ -1,34 +1,22 @@
import React, {ReactNode} from 'react';
import {BodyShort, Heading} from '@navikt/ds-react';
import {MSAIkon} from "./piktogrammer/MSAIkon";
import { Heading} from '@navikt/ds-react';

interface Props {
tittel?: string | JSX.Element;
undertittel?: string;
piktogram?: JSX.Element;
virksomhetsvelger: JSX.Element;
bjelle?: JSX.Element | ReactNode;
}

export const BedriftsmenyView = (props: Props) => (
<div className="navbm-bedriftsmeny">
<div className="navbm-container">
<div className="navbm-piktogram">
{props.piktogram ?? <MSAIkon/>}
</div>
<div className="navbm-innhold">
<div className="navbm-innhold-header">
{typeof props.tittel === 'string' ? (
<Heading size="xlarge">{props.tittel}</Heading>
) : (
props.tittel
)}
{props.undertittel ?
<div className="navbm-innhold-footer">
<BodyShort size="small">{props.undertittel.toUpperCase()}</BodyShort>
</div>
: null
}
</div>
<div className="navbm-widgets">
{props.virksomhetsvelger}
Expand Down
41 changes: 0 additions & 41 deletions src/bedriftsmeny/piktogrammer/Arbeidsforhold.tsx

This file was deleted.

27 changes: 0 additions & 27 deletions src/bedriftsmeny/piktogrammer/AvtalerOmTiltak.tsx

This file was deleted.

22 changes: 0 additions & 22 deletions src/bedriftsmeny/piktogrammer/ForebyggeSykefravaer.tsx

This file was deleted.

22 changes: 0 additions & 22 deletions src/bedriftsmeny/piktogrammer/Kandidater.tsx

This file was deleted.

22 changes: 0 additions & 22 deletions src/bedriftsmeny/piktogrammer/MSAIkon.tsx

This file was deleted.

Loading

0 comments on commit 5074c34

Please sign in to comment.