New package structure & names to be better signalize intended use, along with;
- Support tree-shaking
- Headless components
- Server side rendering
- Easier to override themes using theme builder
- Support planned future features and packages
Renamed & new packages:
Old | New |
---|---|
@digdir/design-system-react |
@digdir/designsystemet-react |
@digdir/design-system-tokens |
@digdir/designsystemet-theme |
@digdir/designsystemet-css |
The styling for all components have now be extracted into a separate packages.
@digdir/designsystemet-theme
and @digdir/designsystemet-css
, now has to be imported to get Designsystemet styling for components.
The new setup for using React components with Designsystemet styling is now:
import '@digdir/designsystemet-theme';
import '@digdir/designsystemet-css';
import { Button } from '@digdir/designsystemet-react';
<Button variant='secondary'>I am a button!</Button>;
@digdir/designsystemet-theme
and @digdir/designsystemet-css
only needs to be imported once.