@sb1/ffe-cards
v100.6.0
Published
Kort for bruk i oversikter
Keywords
Readme
@sb1/ffe-cards
Install
npm install --save @sb1/ffe-core @sb1/ffe-cardsUsage
Full documentation on card usage is available at https://design.sparebank1.no/komponenter/kort/.
Import styling for all card types:
@import 'path/to/node_modules/@sb1/ffe-cards/less/cards';Or pick just the ones you need from these:
@import 'path/to/node_modules/@sb1/ffe-cards/less/text-card';
@import 'path/to/node_modules/@sb1/ffe-cards/less/icon-card';
@import 'path/to/node_modules/@sb1/ffe-cards/less/image-card';Importing compiled CSS
If your project does not use Less, you can import the compiled styling:
@import '~@sb1/ffe-cards/css/cards.css';See also @sb1/ffe-cards-react.
Theming with CSS custom properties
In order to support theming of components, this package contains styling that depends on a set of custom properties, defined in less/theme.less. These properties in turn depend on a base theme defined in ffe-core.
If your project uses the ffe-core, you're probably good to go. If not, make sure to import the core properties in theme.less:
@import '~@sb1/ffe-core/less/theme';Development
To start a local development server, run the following from the designsystem root folder:
npm install
npm run build
npm startA local instance of component-overview with live reloading will run at http://localhost:1234/.
Example implementations using the latest versions of all components are also available at https://sparebank1.github.io/designsystem.
