digdir / designsystemet

Designsystemet
https://designsystemet.no
MIT License
77 stars 37 forks source link

React: Create `Divider` component #1040

Closed mimarz closed 11 months ago

mimarz commented 11 months ago

Its normal to use hr element for dividing content. We have quite a few instances where a divider should be used instead of top/bottom border.

Make a simple Divider component with color tokens and top/bottom margin.

color?: 'default' | 'subtle' | 'strong'

Use cases for a divider is for dividing content used in Card, DropdownMenu , Modal, Popover etc.

Use new divider color tokens: https://github.com/digdir/designsystem/pull/1056


Relevant: #1043

mrosvik commented 11 months ago

New divider color tokens was created in meeting 6.nov: https://github.com/digdir/designsystem/pull/1056