import React from 'react'; import '../../styles/base.module.css'; export interface TagTheme { '--background-color-hover'?: string; '--background-color'?: string; '--border-color-action'?: string; '--color'?: string; '--outline-color'?: string; } export declare enum TagVariant { Action = "action", Informative = "informative", Link = "link" } export declare enum TagSize { Small = "small", Large = "large" } type BaseTagProps = { /** * The label for the tag */ children: string; /** * Additional class names to apply to the tag */ className?: string; /** * Element placed on the starting side of the label */ iconStart?: React.ReactNode; /** * Element placed on the ending side of the label */ iconEnd?: React.ReactNode; /** * Should Tag span to multiple lines * @default false */ multiline?: boolean; /** * Size variant for the Tag. * @default TagSize.Small */ size?: TagSize; /** * Custom theme styles * Will contain more properties in the next major release. */ theme?: TagTheme; /** * Callback function fired when the lement is clicked. If set, the element will be clickable. */ onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void; /** * The ref is forwarded to the root element (anchor or div). */ ref?: React.Ref; }; export type TagAsLink = BaseTagProps & { /** * Url to go to after Link variant is clicked */ href: string; /** * Link's _target -attribute */ target?: React.AnchorHTMLAttributes['target']; /** * Callback function fired when the tag is clicked. If set, a delete button will be shown. */ onDelete?: never; } & Omit, 'children'>; export type TagAsDiv = BaseTagProps & { /** * Url to go to after Link variant is clicked */ href?: never; /** * Link's _target -attribute */ target?: never; /** * Callback function fired when the tag is clicked. If set, a delete button will be shown. */ onDelete?: (event: React.MouseEvent | React.KeyboardEvent) => void; } & Omit, 'children'>; export type TagProps = TagAsLink | TagAsDiv; export declare const Tag: ({ children, className, onClick, onDelete, size, theme, href, iconStart, iconEnd, multiline, ref, ...rest }: TagProps) => React.JSX.Element; export {};