///
type Mode = "primary" | "secondary" | "icon";
type Size = "small" | "medium" | "large";
export type ButtonAsButton = Base & Omit, keyof Base> & {
as?: "button";
};
export type ButtonAsLink = Base & Omit, keyof Base> & {
as?: "link";
};
export interface Base {
/**
* What to put inside the button (string or html elements)
*/
children?: JSX.Element | string;
/**
* Custom css class name
*/
className?: string;
/**
* If you want to add an icon image next to the children. Needs to be an react html element.
*/
icon?: JSX.Element;
/**
* If you want to open a new window on the browser when you click the button. Only applies to html anchor elements.
*/
isNewWindow?: boolean;
/**
* Css mode used to style the button.
*/
mode?: Mode;
/**
* Button size.
*/
size?: Size;
/**
* Button type.
*/
as?: "button" | "link";
/**
* Anchor for the button to follow.
*/
CustomAnchor?: React.ComponentClass;
/**
* Custom background color for storybook.
*/
backgroundColor?: string;
/** Link to url */
link?: string;
}
export {};