From ec4b94ddc2dd217b0fcc201620f4d1a4e079effa Mon Sep 17 00:00:00 2001 From: barsnes Date: Thu, 26 Sep 2024 08:44:43 +0200 Subject: [PATCH] breadcrumbs --- packages/css/breadcrumbs.css | 6 ++++++ .../src/components/Breadcrumbs/Breadcrumbs.tsx | 17 +++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/packages/css/breadcrumbs.css b/packages/css/breadcrumbs.css index 7081f3d3aa..4ab5d5eb98 100644 --- a/packages/css/breadcrumbs.css +++ b/packages/css/breadcrumbs.css @@ -2,14 +2,20 @@ --dsc-breadcrumbs-spacing: var(--ds-spacing-2); --dsc-breadcrumbs-chevron-size: var(--ds-sizing-6); + @composes ds-body-text--md from './baseline/typography.css'; + &[data-size='sm'] { --dsc-breadcrumbs-spacing: var(--ds-spacing-1); --dsc-breadcrumbs-chevron-size: var(--ds-sizing-5); + + @composes ds-body-text--sm from './baseline/typography.css'; } &[data-size='lg'] { --dsc-breadcrumbs-spacing: var(--ds-spacing-3); --dsc-breadcrumbs-chevron-size: var(--ds-sizing-7); + + @composes ds-body-text--lg from './baseline/typography.css'; } & > :is(ol, ul) { diff --git a/packages/react/src/components/Breadcrumbs/Breadcrumbs.tsx b/packages/react/src/components/Breadcrumbs/Breadcrumbs.tsx index c9caf11a2f..304bce93d5 100644 --- a/packages/react/src/components/Breadcrumbs/Breadcrumbs.tsx +++ b/packages/react/src/components/Breadcrumbs/Breadcrumbs.tsx @@ -1,6 +1,5 @@ import cl from 'clsx/lite'; import { type HTMLAttributes, forwardRef } from 'react'; -import { Paragraph } from '../Typography'; export type BreadcrumbsProps = { /** @@ -20,14 +19,12 @@ export const Breadcrumbs = forwardRef( { 'aria-label': ariaLabel = 'Du er her:', className, size, ...rest }, ref, ) => ( - -