UNPKG

@wix/design-system

Version:

@wix/design-system

55 lines 2.15 kB
import React from 'react'; import { TooltipCommonProps } from '../common'; export interface AddItemProps { /** any renderable node or a render function. In case of a render function, text styles will not be applied. */ children?: React.ReactNode | (() => React.ReactNode); /** apply disabled styles */ disabled?: boolean; /** the theme of component */ skin?: AddItemSkin; /** @deprecated use skin instead */ theme?: AddItemSkin; /** switching content alignment */ alignItems?: AddItemAlignItems; /** size to control icon and spacing */ size?: AddItemSize; /** click event handler */ onClick?: React.MouseEventHandler<HTMLButtonElement>; /** Applied as data-hook HTML attribute that can be used to create driver in testing */ dataHook?: string; /** Specifies a CSS class name to be appended to the component’s root element. * @internal */ className?: string; /** When provided, hover will display a tooltip */ tooltipContent?: React.ReactNode; /** Tooltip props * @linkTypeTo components-overlays--tooltip */ tooltipProps?: TooltipCommonProps; /** Displays the plus icon */ showIcon?: boolean; /** Removes padding */ removePadding?: boolean; /** sets the border-radius css property on the button element */ borderRadius?: React.CSSProperties['borderRadius']; /** Defines a string value that labels the add item element */ ariaLabel?: string; /** Subtitle of the component */ ariaLabelledBy?: string; /** Defines a string value that describes the add item element */ ariaDescribedBy?: string; /** Subtitle of the component */ subtitle?: React.ReactNode; /** The illustration icon src or node */ icon?: React.ReactNode; } export interface AddItemActions { blur: () => void; focus: () => void; } export type AddItemSkin = 'dashes' | 'plain' | 'filled' | 'image'; export type AddItemTheme = AddItemSkin; export type AddItemAlignItems = 'center' | 'right' | 'left'; export type AddItemSize = 'large' | 'medium' | 'small' | 'tiny'; //# sourceMappingURL=AddItem.types.d.ts.map