import "./button.css"; import type * as React from "react"; import { Button as Base } from "@base-ui/react/button"; import { type IconName } from "./icon"; import { type StyleProps, type TriggerProps } from "./style_props"; import { type UseTooltipOptions } from "./tooltip"; export type ButtonColor = "primary" | "secondary" | "danger" | "muted" | "danger-secondary"; interface ButtonPropsBase extends StyleProps, TriggerProps { ref?: React.Ref; testID?: string; icon?: IconName; alignSelf?: "flex-start" | "flex-end" | "center" | "stretch" | "auto"; /** Default `secondary`: every action stands on a ground. `muted` is the dismiss — Cancel, Close, leaving * without doing anything — and stands on none. */ color?: ButtonColor; /** * For an action whose destination carries a brand (an export to a spreadsheet, a named sign-in): * the brand's colour becomes a solid ground with white ink. A named slot, since `ButtonColor` is * closed and a brand is on no ladder. A screen with several has no primary. Ignored on `primary` * and `danger`. */ brandColor?: string; loading?: boolean; disabled?: boolean; tooltip?: string | UseTooltipOptions; onPress?: (event: React.MouseEvent) => void; render?: Base.Props["render"]; } /** `title` is mandatory and is the accessible name; icon-only actions are `IconButton`. */ export type ButtonProps = ButtonPropsBase & { title: string; accessibilityLabel?: string; tooltip?: string | UseTooltipOptions; }; export declare function Button(props: ButtonProps): React.JSX.Element; export {};