UNPKG

@cbinsights/fds

Version:
43 lines (42 loc) 1.69 kB
import React from 'react'; import { IconProps } from 'components/Icon'; export declare const THEMES: readonly ["ghost", "aqua", "outlined"]; export declare const RADII: readonly ["square", "circle"]; export declare const SIZES: readonly ["s", "m"]; export interface IconButtonProps { /** * Takes in a react-router `Link` reference and sets it * as the base element. You may ONLY use it like the * following: * * - `import { Link } from 'react-router'` * - `Link={Link}` */ Link?: React.ElementType; /** Controls active style UI of button */ isActive?: boolean; /** Controls radius of button (slightly rounded square, or circle) */ radius?: 'square' | 'circle'; /** Controls spinner showing for icon button (normal icon is hidden) */ isLoading?: boolean; /** Controls look and feel of button */ theme?: 'ghost' | 'aqua' | 'outlined'; /** Controls destructive look and feel of button */ isDestructive?: boolean; /** Used to control the size of the button */ size?: 's' | 'm'; /** Controls whether the button is disabled or not. */ disabled?: boolean; /** Used to render a FDS Icon (should only be used for FDS Icons) */ Icon: React.ComponentType<IconProps>; /** Accessibility label */ label: string; /** Extend click radius of button to nearest relative parent */ isBreakoutLink?: boolean; /** URL for base element */ href?: string; /** Handler for on click event */ onClick?: React.MouseEventHandler<HTMLButtonElement>; } declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<unknown>>; export default IconButton;