2.6.0 • Published 5 years ago
@schibstedspain/sui-atom-tag v2.6.0
AtomTag
Atom Element: SUI Tag
Installation
npm install @schibstedspain/sui-atom-tag --save
Usage
import AtomTag from '@schibstedspain/sui-atom-tag'
<AtomTag
label='Tag Structure'
/>
<AtomTag
label='Navigation Tag'
onClick={() => alert('click!')}
/>
Tag types
If you want to customize your tag you can pass a prop to identify this type and you also need to set your custom set of types in Sass:
Your theme file (Sass)
$atom-tag-types: (
"alert": (
bgc: red,
c: white
),
"warning": (
bgc: orange,
c: white
)
);
Your high order component
<AtomTag type="alert" />
Find full description and more examples in the demo page.