diff --git a/src/sider/hovedmeny/paneler/EttersendDokuPanel.tsx b/src/sider/hovedmeny/paneler/EttersendDokuPanel.tsx index 8c238da8e..3d651e3dd 100644 --- a/src/sider/hovedmeny/paneler/EttersendDokuPanel.tsx +++ b/src/sider/hovedmeny/paneler/EttersendDokuPanel.tsx @@ -4,7 +4,7 @@ import {Attachment} from "@navikt/ds-icons"; import {BodyShort, ExpansionCard, Heading} from "@navikt/ds-react"; import React, {ReactNode} from "react"; import digisosConfig from "../../../lib/config"; -import {HovedmenyCardHeader} from "./HovedmenyCardHeader.tsx"; +import {EXPANSION_CARD_BORDER_STYLE_HACK, HovedmenyCardHeader} from "./HovedmenyCardHeader.tsx"; import {useTranslations} from "next-intl"; export const EttersendDokuPanel = () => { @@ -13,7 +13,7 @@ export const EttersendDokuPanel = () => { const lenke = (chunks: ReactNode) => {chunks}; return ( - + }> {t("title")} diff --git a/src/sider/hovedmeny/paneler/HovedmenyCardHeader.tsx b/src/sider/hovedmeny/paneler/HovedmenyCardHeader.tsx index ca93be413..1117515ac 100644 --- a/src/sider/hovedmeny/paneler/HovedmenyCardHeader.tsx +++ b/src/sider/hovedmeny/paneler/HovedmenyCardHeader.tsx @@ -1,8 +1,16 @@ import * as React from "react"; import {ExpansionCard} from "@navikt/ds-react"; +/** + * react-ds puts a border around expansion cards by default, + * but we're slightly abusing ExpansionCard so we unset it like this. + */ +export const EXPANSION_CARD_BORDER_STYLE_HACK = { + "--__ac-expansioncard-border-color": "transparent", +} as React.CSSProperties; + export const HovedmenyCardHeader = ({children, icon}: {children: React.ReactNode; icon: React.ReactNode}) => ( - button]:my-auto !ring-0"}> + button]:my-auto"}>
{icon}
{children}
diff --git a/src/sider/hovedmeny/paneler/NySoknadPanel.tsx b/src/sider/hovedmeny/paneler/NySoknadPanel.tsx index 5297a788f..32d94d554 100644 --- a/src/sider/hovedmeny/paneler/NySoknadPanel.tsx +++ b/src/sider/hovedmeny/paneler/NySoknadPanel.tsx @@ -1,11 +1,15 @@ import {ExpansionCard, Heading} from "@navikt/ds-react"; -import {HovedmenyCardHeader} from "./HovedmenyCardHeader"; +import {EXPANSION_CARD_BORDER_STYLE_HACK, HovedmenyCardHeader} from "./HovedmenyCardHeader"; import {FillForms} from "@navikt/ds-icons"; import {useTranslations} from "next-intl"; import {NySoknadInfo} from "./NySoknadInfo.tsx"; export const NySoknadPanel = ({defaultOpen}: {defaultOpen?: boolean}) => ( - + }> {useTranslations("NySoknadPanel")("title")} diff --git a/src/sider/hovedmeny/paneler/PabegynteSoknader.tsx b/src/sider/hovedmeny/paneler/PabegynteSoknader.tsx index b12a19e0e..ea197fd27 100644 --- a/src/sider/hovedmeny/paneler/PabegynteSoknader.tsx +++ b/src/sider/hovedmeny/paneler/PabegynteSoknader.tsx @@ -4,7 +4,7 @@ import {BodyShort, ExpansionCard} from "@navikt/ds-react"; import React from "react"; import {useTranslations} from "next-intl"; import {PabegyntSoknadView} from "./PabegyntSoknadView.tsx"; -import {HovedmenyCardHeader} from "./HovedmenyCardHeader.tsx"; +import {EXPANSION_CARD_BORDER_STYLE_HACK, HovedmenyCardHeader} from "./HovedmenyCardHeader.tsx"; import {useContextSessionInfo} from "../../../lib/providers/useContextSessionInfo.ts"; export const DAYS_BEFORE_DELETION = 14; @@ -18,12 +18,12 @@ export const PabegynteSoknaderPanel = () => { if (!count) return null; return ( - + }> {t("title")} - + {t("pabegynte", {count})}