UNPKG

@cbinsights/fds

Version:
36 lines (35 loc) 1.33 kB
import React from 'react'; import { IconProps } from 'components/Icon'; export interface StackedButtonProps { /** * 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 whether the button is disabled or not. Will control the disabled * presentation of either an anchor or button rendered under the hood, * but will only add a disabled attribute for buttons */ disabled?: boolean; /** Pass in "only" a FDS Icon reference to display it (e.g. Icon={ApproveIcon}) */ Icon?: React.ComponentType<IconProps>; /** Text inside the button */ label: string | number; /** Controls the active state, which changes UI (colors) */ isActive?: boolean; /** Controls the toggled state, which changes UI (colors) */ isToggled?: boolean; /** Controls whether caret icon is displayed */ hasCaret?: boolean; /** URL for anchor element */ href?: string; /** handler for onclick event */ onClick?: () => void; } declare const StackedButton: React.ForwardRefExoticComponent<StackedButtonProps & React.RefAttributes<unknown>>; export default StackedButton;