Object
An object is an icon that represents a content type.
Install
One package and one stylesheet. The stylesheet holds the tokens every component uses.
pnpm add @wolf-rayet/reactimport '@wolf-rayet/react/css/wolf-rayet.css';
import { ObjectIcon } from '@wolf-rayet/react';Props
A required prop is marked with an asterisk.
| Prop | Type | Default | Description |
|---|---|---|---|
| type | 'story' | 'bug' | 'epic' | 'task' | 'task' | The content type. Each type has its own colour and glyph. Use the same pairing across the product. |
| label * | string | None | Names the type for screen readers, as in Bug. Required, because otherwise only the glyph shows the type. |
Accessibility
What the component does for you, and what it needs from you.
- The label names the type and is required, because the glyph and its colour are the only other signals.
- Colour tells the four types apart, so the label carries the meaning for people who cannot see colour.
- In a list of one type, leave the icon out instead of repeating it on every row.