UI
ToneDisc
ToneDisc displays a glyph on a circular background, with both colors chosen by tone.
import { ToneDisc } from '@tallyui/components';
<ToneDisc tone="ok" size="lg" />
| Prop | Type | Default | Description |
|---|
tone | ToneDiscTone | Required | Selects the background, glyph color and default icon |
icon | React.ComponentType<SvgIconProps> | Tone's glyph | Replaces the glyph without changing the tone |
size | 'sm' | 'default' | 'lg' | 'default' | Sizes both disc and glyph |
testID | string | — | Identifies the outer view in tests |
ToneDiscTone | Background | Glyph color | Default glyph |
|---|
ok | bg-ok-bg | text-ok | CheckIcon |
warning | bg-warning-bg | text-warning-text | AlertTriangleIcon |
bad | bg-bad-bg | text-bad | AlertCircleIcon |
info | bg-info/15 | text-info | InfoCircleIcon |
muted | bg-muted | text-muted-foreground | InfoCircleIcon |
| Size | Disc class | Glyph size |
|---|
sm | size-11 | 18 |
default | size-14 | 28 |
lg | size-24 | 36 |