(props: {
color: keyof typeof tokens.colors
label: string
count?: number
disabled?: boolean
})
| 3 | import type { tokens } from '../styles/tokens' |
| 4 | |
| 5 | export const Tag = (props: { |
| 6 | color: keyof typeof tokens.colors |
| 7 | label: string |
| 8 | count?: number |
| 9 | disabled?: boolean |
| 10 | }) => { |
| 11 | const styles = createStyles() |
| 12 | return ( |
| 13 | <button |
| 14 | data-tsd-control |
| 15 | disabled={props.disabled} |
| 16 | class={styles().tag.base} |
| 17 | > |
| 18 | <span class={styles().tag.dot(props.color)} /> |
| 19 | <span class={styles().tag.label}>{props.label}</span> |
| 20 | |
| 21 | <Show when={props.count && props.count > 0}> |
| 22 | <span class={styles().tag.count}>{props.count}</span> |
| 23 | </Show> |
| 24 | </button> |
| 25 | ) |
nothing calls this directly
no test coverage detected