The icon component uses svg icons from the generated datastory-icons.svg spritesheet.
You can learn more about how to manage icons for Datastory in the brand guidelines.
import Icon, { Flag } from "@ds-kit/icon"
The icon component takes name
as a prop. The name has to coincide with the name the icon has in the spritesheet. Please cross check the icon names in Nucleo.
<Icon name="play" />
You can modify the color of the icon via the color
prop.
<Icon name="translate" color="cyan.500" />
Most Datastory icons are build on the 24px grid, with the exception of country flags that use the 48px by default. The size of the icon can be modified via the size
prop.
<Icon name="translate" size="3rem" />
Datastory uses the Nucleo country flags. For flags use the
<Flag name="usa" />
kind
string
"icon"
name
string
"share"
color
string
array
"currentcolor"
strokeWidth
number
2
stroke
string
"currentcolor"
fill
string
"currentcolor"
size
string
number
array
"1.5rem"