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'
4
4
import type { MouseEventHandler , ReactNode } from 'react'
5
5
import { useMemo } from 'react'
6
6
import useClipboard from 'react-use-clipboard'
7
- import type { Color } from '../../theme'
8
7
import { Button } from '../Button'
9
8
import { Loader } from '../Loader'
10
9
import { Text } from '../Text'
11
10
import { Tooltip } from '../Tooltip'
11
+ import type { SENTIMENTS } from './styles.css'
12
12
import { closeButtonTag , containerTag , textTag } from './styles.css'
13
13
14
14
const COPY_DURATION = 2500
15
15
16
16
type TagProps = {
17
17
isLoading ?: boolean
18
18
onClose ?: MouseEventHandler < HTMLButtonElement >
19
- sentiment ?: Color
19
+ sentiment ?: ( typeof SENTIMENTS ) [ number ]
20
20
disabled ?: boolean
21
21
copiable ?: boolean
22
22
copyText ?: string
@@ -104,6 +104,7 @@ export const Tag = ({
104
104
< button
105
105
className = { `${ className ? `${ className } ` : '' } ${ containerTag ( { copiable, disabled, sentiment } ) } ` }
106
106
data-testid = { dataTestId }
107
+ disabled = { disabled }
107
108
onClick = { setCopied }
108
109
>
109
110
< 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'
2
2
import { recipe } from '@vanilla-extract/recipes'
3
3
import { style } from '@vanilla-extract/css'
4
4
5
- const SENTIMENTS = [
5
+ export const SENTIMENTS = [
6
6
'danger' ,
7
7
'info' ,
8
8
'neutral' ,
You can’t perform that action at this time.
0 commit comments