@wix/design-system
Version:
@wix/design-system
34 lines (31 loc) • 1.38 kB
TypeScript
import * as React from 'react';
import { TooltipCommonProps } from '../common';
export interface FillButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
/** Defines a callback handler. Handler is called whenever a button is clicked. */
onClick?: React.MouseEventHandler<HTMLButtonElement>;
/** Controls the size of a plus icon.
* @default 'small'
*/
iconSize?: FillButtonIconSize;
/** Specify whether button should be disabled or not */
disabled?: boolean;
/** Defines button fill value in string format. Accepts HEX colors and gradients. */
fill?: string;
/** Specifies a message to display on button hover. */
tooltipContent?: React.ReactNode;
/** Allows to pass tooltip common props.
* @linkTypeTo components-overlays--tooltip
* @setTypeName TooltipCommonProps
*/
tooltipProps?: TooltipCommonProps;
/** Applies a data-hook HTML attribute that can be used in the tests */
dataHook?: string;
/** Specifies a CSS class name to be appended to the component’s root element.
* @internal
*/
className?: string;
/** Overrides a default plus icon to any WSR icon. Do not work together with `iconSize`. Icon size has to be controlled manually.*/
icon?: React.ReactNode;
}
export default class FillButton extends React.PureComponent<FillButtonProps> {}
export type FillButtonIconSize = 'small' | 'medium';