import * as React from 'react'; import type { DOMProps, QAProps } from "../types.js"; import type { BUTTON_VIEWS } from "./constants.js"; import "./Button.css"; export type ButtonView = (typeof BUTTON_VIEWS)[number]; export type ButtonSize = 'xs' | 's' | 'm' | 'l' | 'xl'; export type ButtonPin = 'round-round' | 'brick-brick' | 'clear-clear' | 'circle-circle' | 'round-brick' | 'brick-round' | 'round-clear' | 'clear-round' | 'brick-clear' | 'clear-brick' | 'circle-brick' | 'brick-circle' | 'circle-clear' | 'clear-circle'; export type ButtonWidth = 'auto' | 'max'; interface ButtonCommonProps extends QAProps, DOMProps { view?: ButtonView; size?: ButtonSize; pin?: ButtonPin; selected?: boolean; disabled?: boolean; loading?: boolean; width?: ButtonWidth; children?: React.ReactNode; } export interface ButtonButtonProps extends ButtonCommonProps, Omit, 'disabled' | 'style'> { component?: never; href?: never; /** * @deprecated Use additional props at the root */ extraProps?: React.ButtonHTMLAttributes; } export interface ButtonLinkProps extends ButtonCommonProps, Omit, 'style'> { component?: never; href: string; /** * @deprecated Use additional props at the root */ extraProps?: React.AnchorHTMLAttributes; } export type ButtonComponentProps> = ButtonCommonProps & React.ComponentPropsWithoutRef & { component: T; /** * @deprecated Use additional props at the root */ extraProps?: React.ComponentPropsWithoutRef; }; export type ButtonCustomElementType = Exclude | undefined; export type ButtonProps = ButtonLinkProps | ButtonButtonProps | ButtonComponentProps>; export declare const Button: (>(props: P extends { component: Exclude; } ? ButtonComponentProps> & { ref?: React.Ref : T>; } : P extends { href: string; } ? ButtonLinkProps & { ref?: React.Ref; } : ButtonButtonProps & { ref?: React.Ref; }) => React.ReactElement) & { Icon: { ({ side, className, children }: { className?: string; side?: "left" | "right" | "start" | "end"; } & { children?: React.ReactNode | undefined; }): import("react/jsx-runtime").JSX.Element; displayName: string; }; }; export {};