@cbinsights/fds
Version:
Form: A design system by CB Insights
40 lines (39 loc) • 1.31 kB
TypeScript
import Icon from 'components/Icon';
export declare type ElementChildren = {
children: JSX.Element;
};
export interface GroupButtonProps {
/** Displays active button style when true */
isActive?: boolean;
/**
* 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?: JSX.Element;
/** Text that appears in GroupButton */
label?: string;
/** Controls whether button is disabled or not (works for
* anchor tags as well, visually) */
disabled?: boolean;
/** Used to render a FDS Icon (should only be used for FDS Icons) */
Icon?: Icon;
/**
* A component to wrap the entire group button. The
* `wrapper` must render the children prop passed into it
* to render the GroupButton.
*/
Wrapper?: ({ children }: ElementChildren) => JSX.Element;
/** Assigns the first button styling. */
isFirstButton?: boolean;
/** Assigns the last button styling. */
isLastButton?: boolean;
/** Specifies a URL to link to. */
href?: string;
onClick: () => void;
}
export declare const GroupButton: (props: GroupButtonProps) => JSX.Element;
export default GroupButton;