import { IconSVGName } from '@epilot360/icons'; import { LinkProps } from '@material-ui/core'; import { DetailedHTMLProps, HTMLAttributes, ReactNode } from 'react'; declare type NativeButton = DetailedHTMLProps, HTMLButtonElement>; export declare type Chip360Props = Omit & { /** * Sets the content of the chip */ label: ReactNode; /** * Sets the left-positioned icon (use icon names from @epilot360/icons) */ leftIcon?: IconSVGName; /** * Sets the right-positioned icon (accepts only 'close' or 'expand_more' from @epilot360/icons) */ rightIcon?: Extract; /** * Handler for click events on the chip and makes chip clickable. Use `isClickable` alternatively to turn on clickable styles. */ onClick?: NativeButton['onClick']; /** * Adds a fill to the chip background */ isFilled?: boolean; /** * Adds a border to the chip */ isBordered?: boolean; /** * Disables the chip (alternatively use the `disabled` variant). * * Note: This nullifies all click events including links */ isDisabled?: boolean; /** * Turns on clickable styles if `onClick` is not set */ isClickable?: boolean; /** * Makes the chip a link chip and sets its href attribute. */ href?: string; /** * Sets the target attribute of the link chip */ target?: LinkProps['target']; /** * Sets the rel attribute of the link chip */ rel?: LinkProps['rel']; /** * Sets the size of the chip. The default value is `medium` */ size?: 'small' | 'medium'; /** * Sets the chip color variants. * * Note: The `custom` variant lets you override the chip colors using the following props - `color`, `backgroundColor`, `borderColor`, `hoverBgColor`, `activeBgColor`, `filledHoverBgColor`, `filledActiveBgColor`. See below. */ variant?: 'primary' | 'secondary' | 'error' | 'warning' | 'success' | 'surface-container-low' | 'surface-container-lowest' | 'surface-container' | 'surface-container-high' | 'surface-container-highest' | 'disabled' | 'custom'; /** * Overrides the font color and icon color (superseded by `borderColor`) of a custom chip. * * Note: This prop only works on the `custom` variant */ color?: string; /** * Overrides the background color of a custom chip. * * Note: This prop only works on the `custom` variant */ backgroundColor?: string; /** * Overrides the border color and icon color (supersedes `color`) of a bordered custom chip. * * Note: This prop only works on the `custom` variant */ borderColor?: string; /** * Overrides the hover background color of a custom chip. * * Note: This prop only works on the `custom` variant */ hoverBgColor?: string; /** * Overrides the active background color of a custom chip. * * Note: This prop only works on the `custom` variant */ activeBgColor?: string; /** * Overrides the hover background color of a filled custom chip. * * Note: This prop only works on the `custom` variant */ filledHoverBgColor?: string; /** * Overrides the active background color of a filled custom chip. * * Note: This prop only works on the `custom` variant */ filledActiveBgColor?: string; /** * Right icon click handler * */ onRightIconClick?: React.MouseEventHandler; /** * Allows inline editing of the Chip content */ isEditable?: boolean; /** * On change handler for inline editing */ onLabelChange?: (value: string) => void; /** * Allows to position controls outside of form */ shouldRenderControlsOutsideForm?: boolean; }; export {};