import { default as React } from 'react'; import { IconName } from '../types/Icon.types'; export type ButtonKind = "primary" | "secondary" | "tertiary" | "tonal" | "negative" | "plain" | "ai"; export interface ButtonProps { /** Renders the button label */ label?: string; /** style of button to render */ kind?: ButtonKind; /** Click callback, with event object passed as argument */ onClick?: (e: any) => void; /** * The html element to render as the root node of `Button`. * * When rendering as an "a" you **MUST** pass an `href` attribute * for the anchor to be valid. */ as?: "a" | "button"; /** disables the button when set to `true` */ disabled?: boolean; /** disables the button and adds a loading spinner when set to `true` */ isLoading?: boolean; /** type attribute of button element */ type?: "submit" | "button" | "reset"; /** size variant of button */ size?: "xs" | "s" | "m"; /** horizontal alignment of button label content */ labelAlign?: "start" | "center" | "end"; /** Name of Narmi icon to place at the start of the label */ startIcon?: IconName | null; /** Name of Narmi icon to place at the end of the label */ endIcon?: IconName | null; /** Optional value for `data-testid` attribute */ testId?: string; /** Optional value for setting the aria-label. If unset label will be used. */ ariaLabel?: string | null; /** * **⚠️ DEPRECATED** * * Passing children to render the button label will be removed * in a future release. Use the `label` prop instead. */ children?: React.ReactNode | string | undefined; /** * Will take up full width of its parent container when `true`. * Full-width buttons align label content to `start` by default; use `labelAlign` * to override that alignment. */ isFullWidth?: boolean; [x: string]: unknown; } /** * Narmi style action buttons. * * Button renders as a `button` element by default, but can render as an `a` element * via the `as` prop. * * This component supports rest props; any additional props on button will be * passed through to the root node of `Button`. */ declare const Button: ({ isLoading, disabled, kind, type, size, labelAlign, startIcon, endIcon, testId, children, label, onClick, as, ariaLabel, isFullWidth, ...otherProps }: ButtonProps) => React.JSX.Element; export default Button; //# sourceMappingURL=index.d.ts.map