Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
The build process is configured to transform SVGs into React components, using SVGR. The script looks for all .svg
files in packages/ds/src/components/icons
and generates a .tsx
file of the same name.
The components support space
, color
, layout
& typography
styled-system props.
CheckCircle
CheckboxBlank
CheckboxChecked
CheckboxIndeterminate
Close
Error
ExpandMore
Info
Loader
Place
RadioChecked
RadioUnchecked
Search
Visibility
VisibilityOff
CheckCircle
CheckboxBlank
CheckboxChecked
CheckboxIndeterminate
Close
Error
ExpandMore
Info
Loader
Place
RadioChecked
RadioUnchecked
Search
Visibility
VisibilityOff
As a compound Icons
component
The icon generator script replaces the SVG width
and height
values by 1em
to make the SVG size inherit the font-size. Which, in turn, allows you to control the size of the icon using the fontSize
prop.
However, you can still control the size of the icon using the width
and height
props.
By using the fill or stroke as currentColor
allows the icons to inherit the text color.
Add or replace .svg
files in packages/ds/src/components/icons
. The design system comes pre-populated with a few icons, which must either be preserved or replaced with similar icons.
Each SVG icon must conform to the following:
viewBox
attribute, preferably 0 0 24 24
.currentColor
for strokes and fills. Or configure SVGR to make that change.<path>
elements and avoid transforms.Icons are visual elements that can either be purely decorative or act as shorthand to convey a message.
When used for decorative purposes, ensure that it is ignored by screen readers, by setting the aria-hidden
attribute.
When used for non-decorative purposes, it must have a proper alternative text set via title
props.