import type { Color, SeverityColors } from '@digdir/designsystemet-types'; import type { ButtonHTMLAttributes, ReactNode } from 'react'; import type { DefaultProps } from '../../types'; import type { MergeRight } from '../../utilities'; export type ButtonProps = MergeRight, 'command' | 'commandfor' | 'commandFor'>, { /** * Specify which variant to use * @default 'primary' */ variant?: 'primary' | 'secondary' | 'tertiary'; /** * Change the color scheme of the button */ 'data-color'?: Color | Extract; /** * Toggle icon only styling, pass icon as children * When combined with loading, the loading-icon will be shown instead of the icon. * @default false */ icon?: boolean; /** * Toggle loading state. * Pass an element if you want to display a custom loader. * * @default false */ loading?: boolean | ReactNode; /** * Change the default rendered element for the one passed as a child, merging their props and behavior. * @default false */ asChild?: boolean; /** * Specify the type of button. Unset when `asChild` is true * @default 'button' */ type?: ButtonHTMLAttributes['type']; /** * Native invoker commands. Specifies actions to perform on an element specified by commandfor. Polyfilled by designsystemet-web and includes a custom --show-non-modal command. * "show-modal", "close", "request-close", "show-popover", "hide-popover", "toggle-popover", "--show-non-modal" */ command?: string; /** * Specifies the target element for "command". * value is ID of target */ commandfor?: string; commandFor?: string; }>; /** * Button used for interaction * * @example * */ export declare const Button: import("react").ForwardRefExoticComponent, "command" | "commandfor" | "commandFor">, "type" | "data-color" | "command" | "commandfor" | "commandFor" | "variant" | "icon" | "loading" | "asChild"> & { /** * Specify which variant to use * @default 'primary' */ variant?: "primary" | "secondary" | "tertiary"; /** * Change the color scheme of the button */ 'data-color'?: Color | Extract; /** * Toggle icon only styling, pass icon as children * When combined with loading, the loading-icon will be shown instead of the icon. * @default false */ icon?: boolean; /** * Toggle loading state. * Pass an element if you want to display a custom loader. * * @default false */ loading?: boolean | ReactNode; /** * Change the default rendered element for the one passed as a child, merging their props and behavior. * @default false */ asChild?: boolean; /** * Specify the type of button. Unset when `asChild` is true * @default 'button' */ type?: ButtonHTMLAttributes["type"]; /** * Native invoker commands. Specifies actions to perform on an element specified by commandfor. Polyfilled by designsystemet-web and includes a custom --show-non-modal command. * "show-modal", "close", "request-close", "show-popover", "hide-popover", "toggle-popover", "--show-non-modal" */ command?: string; /** * Specifies the target element for "command". * value is ID of target */ commandfor?: string; commandFor?: string; } & import("react").RefAttributes>; //# sourceMappingURL=button.d.ts.map