Icons
import { Icon } from "@study/ui";
<Icon name="calendar" />
<Icon name="star" filled size={24} />
All icons are drawn on a 24 × 24 grid with round 2 px lines and take on the text colour. Some have a filled form (second icon in the tile) – for course tiles and states that should carry more weight.
A click copies the code.
Rules
- No emojis, no icons from other sets. If one is missing, it is added to
Icon.tsxin the same style. - Next to text, an icon is decoration and hidden from screen readers. If it stands alone, it needs a
label– or it sits in anIconButton, which carries the name. - Sizes: 16 in small buttons, 18–20 in text, 22 in navigation, 26–34 in course tiles.
Props
| Prop | Type | Default | Meaning |
|---|---|---|---|
name * | enum | – | |
filled | boolean | false | The filled form, where there is one; otherwise the line form. |
label | string | – | What the icon means, when nothing next to it says so. Without it the icon is hidden from screen readers. |
size | number | 20 | Width and height in px. |