import type { PropsWithChildren, ReactNode } from "react"; import type { IconComponentType } from "../../Icons"; export type ButtonVariant = "subtle" | "neutral" | "primary" | "destructive"; export declare const buttonSizes: readonly ["small", "medium", "large"]; export type ButtonSize = (typeof buttonSizes)[number]; export interface ButtonBaseProps { /** * The variant of the `Button`. * @default neutral */ variant?: ButtonVariant; /** * The size of the `Button`. * @default medium */ size?: ButtonSize; /** * The left aligned icon of the `Button`. */ startIcon?: IconComponentType; /** * The right aligned icon of the `Button`. */ endIcon?: IconComponentType; /** * The content of the `Button`. */ children: ReactNode; /** * Whether the `Button` is loading. * @default false */ loading?: boolean; /** * Whether the `Button` is disabled. * @default false */ disabled?: boolean; /** * The class name of the `Button`. */ className?: string; } export declare function isButtonType(props: any): props is JSX.IntrinsicElements["button"]; type AsProp = { as?: C; }; type PropsToOmit = keyof (AsProp & P); type PolymorphicComponentProp = PropsWithChildren> & Omit, PropsToOmit>; export type PolymorphicComponentPropWithRef = PolymorphicComponentProp & { ref?: PolymorphicRef; }; export type PolymorphicRef = React.ComponentPropsWithRef["ref"]; export {};