import { default as React, Ref } from 'react'; import { IconName } from '../Icon'; export type ButtonVariant = 'primaryBrand' | 'primaryInfo' | 'primarySuccess' | 'primaryWarning' | 'primaryAlert' | 'secondaryBrand' | 'secondaryNeutral' | 'secondaryInfo' | 'secondarySuccess' | 'secondaryWarning' | 'secondaryAlert' | 'tertiaryBrand' | 'tertiaryNeutral' | 'tertiaryInfo' | 'tertiarySuccess' | 'tertiaryWarning' | 'tertiaryAlert' | 'tertiaryComplementary'; interface CommonBase { ref?: Ref; /** * className for the element */ className?: string; /** * Specifies the width of the element * @default content */ fit?: 'content' | 'parent'; /** * The icon to display in the button */ iconName?: IconName; /** * Specifies where the icon is positioned * @default left */ iconPosition?: 'left' | 'right'; /** * Whether the button should be disabled * @default false */ isDisabled?: boolean; /** * Whether the button should be is loading state * @default false */ isLoading?: boolean; /** * The text to display in the button. */ text: string; /** * The visual style of the button * @default primaryBrand */ variant?: ButtonVariant; /** * Whether the button should have negative margins. Has effect only on ghost variant * @default false */ hasNegativeMargins?: boolean; /** * Whether the button should have no horizontal padding. Has effect only on tertiary variant * @default false */ hasNoHorizontalPadding?: boolean; /** * Whether the button is being used as a dropdown button. It adds the chevron-down icon. * @default false */ isDropdown?: boolean; } interface ButtonProps extends React.HTMLProps { /** * The HTML element element used to render the button */ component?: 'button'; } interface LinkProps extends React.HTMLProps { /** * The HTML element element used to render the button */ component: 'a'; /** * A URL to link to */ href: string; } export type Props = (CommonBase & ButtonProps) | (CommonBase & LinkProps); /** * Buttons allow users to perform an action. * @see https://grapes.spendesk.design/docs/components/button */ export declare const Button: (props: Props) => React.JSX.Element; export {}; //# sourceMappingURL=Button.d.ts.map