import type { XOR } from '@scaleway/types'; import type { RenderProp } from '@ultraviolet/utils'; import type { AriaRole, ButtonHTMLAttributes, CSSProperties, MouseEventHandler, ReactNode } from 'react'; type CommonProps = { type?: ButtonHTMLAttributes['type']; autoFocus?: ButtonHTMLAttributes['autoFocus']; role?: AriaRole; className?: string; 'data-testid'?: string; /** * @private */ 'data-flip-id'?: string; isLoading?: boolean; /** * @deprecated use `accessibleLabel` instead. */ 'aria-label'?: string; 'aria-current'?: boolean; 'aria-controls'?: string; 'aria-expanded'?: boolean; 'aria-haspopup'?: boolean; 'aria-describedby'?: string; 'aria-disabled'?: boolean; 'aria-pressed'?: boolean; 'aria-roledescription'?: string; 'aria-keyshortcuts'?: string; onClick?: MouseEventHandler; /** * @deprecated use `tooltipDescription` instead. */ tooltip?: string; /** * Label of the button rendered inside a Tooltip. */ tooltipLabel?: string; /** * Description of the button rendered inside a Tooltip. */ tooltipDescription?: string; /** * Accessible label hidden in the button. * Prefer this over `aria-label` as the text is localizable. */ accessibleLabel?: string; form?: ButtonHTMLAttributes['form']; tabIndex?: ButtonHTMLAttributes['tabIndex']; onMouseDown?: MouseEventHandler; onMouseUp?: MouseEventHandler; onMouseOut?: MouseEventHandler; onBlur?: ButtonHTMLAttributes['onBlur']; onMouseEnter?: MouseEventHandler; onMouseLeave?: MouseEventHandler; onPointerDown?: ButtonHTMLAttributes['onPointerDown']; onKeyDown?: ButtonHTMLAttributes['onKeyDown']; style?: CSSProperties; disabled?: boolean; fullWidth?: boolean; sentiment?: 'danger' | 'info' | 'neutral' | 'primary' | 'secondary' | 'success' | 'warning' | 'black' | 'white'; size?: 'small' | 'medium' | 'large' | 'xsmall'; variant?: 'filled' | 'outlined' | 'ghost'; }; type BaseButtonProps = CommonProps & { children: ReactNode; name?: string; } & XOR<[ { href?: string; target?: string; download?: string; }, { /** * Custom element or render function to use instead of the default button. * * Element form (props auto-merged): * ```tsx * * ``` * * Function form (you control prop merging): * ```tsx * * ``` */ render: RenderProp; } ]>; /** * Button component is used to trigger an action or event, such as submitting a form, opening a dialog, * canceling an action, or performing a delete operation. * Use `render` prop to render a custom element (e.g., Next.js Link) while preserving Button's styling. */ export declare const Button: import("react").ForwardRefExoticComponent>; export {}; //# sourceMappingURL=index.d.ts.map