Icon
Wraps any SVG (or icon element) in a 1em box driven by size. With label it becomes
accessible; without one it is decorative (aria-hidden).
import { Icon } from '@gg-software/ui';
<Icon label="Star">
<StarSvg />
</Icon>
<Icon size={28}>
<StarSvg />
</Icon>
<Icon spin label="Loading">
<SpinnerSvg />
</Icon>Props
| Prop | Type | Default | Description |
|---|---|---|---|
children* | ReactNode | — | content rendered inside the component |
size | string | number | — | size as a px number or any CSS length (drives the 1em box) |
spin | boolean | false | |
label | string | — | accessible label; when omitted the icon is decorative (aria-hidden) |
className | string | — |
* required · generated from packages/ui/src/display/Icon/Icon.tsx