UNPKG

@yamada-ui/tag

Version:

Yamada UI tag component

62 lines (59 loc) 1.62 kB
import * as _yamada_ui_core from '@yamada-ui/core'; import { HTMLUIProps, ThemeProps } from '@yamada-ui/core'; import { ReactElement, MouseEventHandler } from 'react'; interface TagOptions { /** * If `true`, the tag is disabled. * * @default false */ disabled?: boolean; /** * Icon to be displayed to the end of the tag. */ endIcon?: ReactElement; /** * If `true`, the tag is disabled. * * @default false * * @deprecated Use `disabled` instead. */ isDisabled?: boolean; /** * Icon to be displayed to the left of the tag. * * @deprecated Use `startIcon` instead. */ leftIcon?: ReactElement; /** * Icon to be displayed to the right of the tag. * * @deprecated Use `endIcon` instead. */ rightIcon?: ReactElement; /** * Icon to be displayed to the start of the tag. */ startIcon?: ReactElement; /** * Props for tag close button element. */ closeButtonProps?: TagCloseButtonProps; /** * Function to be executed when the close button is clicked. */ onClose?: MouseEventHandler<HTMLElement>; } interface TagProps extends HTMLUIProps<"span">, ThemeProps<"Tag">, TagOptions { } /** * `Tag` is a component used to categorize or organize items using keywords that describe them. * * @see Docs https://yamada-ui.com/components/data-display/tag */ declare const Tag: _yamada_ui_core.Component<"span", TagProps>; interface TagCloseButtonProps extends HTMLUIProps<"span"> { disabled?: boolean; } export { Tag, type TagProps };