import React, { ButtonHTMLAttributes, ReactNode } from 'react'; import { type RenderProp } from '../../internal/render-seam'; /** What the `render` function form is told about the button. */ export interface ButtonRenderState { variant: ButtonProps['variant']; disabled: boolean; loading: boolean; } export interface ButtonProps extends ButtonHTMLAttributes { /** * Which of Figma's four drawn types to draw, plus `destructive`. * * `.button-main` (22:3854) has exactly three types and no size axis — 40px is the only height it * draws. * * `destructive` is not one of Figma's three either, but it is not invented: it draws from * `--color-bg-button-destructive` (+hover/pressed/disabled), a token ramp already minted and * shaped exactly like `--color-bg-button-primary`'s, carrying `--color-text-button-primary` — * the same white ink `primary` already uses on its fill. A rule-2 derivation, denoted in * `docs/FIGMA-EXCEPTIONS.md`, not a new colour. * * `ghost` is a second, different Figma link: `Link` (1520:37925), the RCS card's 12/18 row label * with no underline. Not the `ghost` 0.5.0 deleted. * * @default 'primary' */ variant?: 'primary' | 'secondary' | 'link' | 'ghost' | 'destructive'; /** * Button content */ children?: ReactNode; /** * Is button disabled */ disabled?: boolean; /** * Is button loading (if supported, render spinner) */ isLoading?: boolean; /** * Render the button as a different element, keeping its styling and behavior. * * This is Base UI's `render` seam and the house convention for element * swapping — never `asChild` or `as`. * * Takes an element or a function. **The two differ more here than elsewhere:** the element form * folds the caller's own `onClick`, `tabIndex` and `className` into the disabled-inerting, because * it can read them off the element. A function has no props to read, so it receives the computed * props and must spread them — which means the disabled blocking holds only if it does. */ render?: RenderProp; } /** * Button component with multiple variants and sizes. * * @example * * */ export declare const Button: React.ForwardRefExoticComponent>; //# sourceMappingURL=button.d.ts.map