File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
packages/ui/src/components/Tag Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4,19 +4,19 @@ import { CloseIcon } from '@ultraviolet/icons'
44import type { MouseEventHandler , ReactNode } from 'react'
55import { useMemo } from 'react'
66import useClipboard from 'react-use-clipboard'
7- import type { Color } from '../../theme'
87import { Button } from '../Button'
98import { Loader } from '../Loader'
109import { Text } from '../Text'
1110import { Tooltip } from '../Tooltip'
11+ import type { SENTIMENTS } from './styles.css'
1212import { closeButtonTag , containerTag , textTag } from './styles.css'
1313
1414const COPY_DURATION = 2500
1515
1616type TagProps = {
1717 isLoading ?: boolean
1818 onClose ?: MouseEventHandler < HTMLButtonElement >
19- sentiment ?: Color
19+ sentiment ?: ( typeof SENTIMENTS ) [ number ]
2020 disabled ?: boolean
2121 copiable ?: boolean
2222 copyText ?: string
@@ -104,6 +104,7 @@ export const Tag = ({
104104 < button
105105 className = { `${ className ? `${ className } ` : '' } ${ containerTag ( { copiable, disabled, sentiment } ) } ` }
106106 data-testid = { dataTestId }
107+ disabled = { disabled }
107108 onClick = { setCopied }
108109 >
109110 < TagInner disabled = { disabled } isLoading = { isLoading } onClose = { onClose } >
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { theme } from '@ultraviolet/themes'
22import { recipe } from '@vanilla-extract/recipes'
33import { style } from '@vanilla-extract/css'
44
5- const SENTIMENTS = [
5+ export const SENTIMENTS = [
66 'danger' ,
77 'info' ,
88 'neutral' ,
You can’t perform that action at this time.
0 commit comments