import * as React from 'react'; import { ComponentSync } from '../../core/ComponentSync.js'; import { ResolvableContent } from '@nu-art/ts-common'; import './Button.scss'; type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous' | (string & {}); type ButtonProps = Omit, 'type' | 'ref'>; type Props = ButtonProps & { loader?: ResolvableContent; variant?: ButtonVariant; innerRef?: React.RefObject; actionInProgress?: boolean; onDisabledClick?: (e: React.MouseEvent) => any; }; type State = { actionInProgress: boolean; disabled: boolean; }; /** * Thunderstorm Button component, this component is the de-facto button in our system.
* This button handles both sync and async actions, and can be autonomous or controlled.
* * @property variant - the variant of the button, will be added to the button element as a "data-variant" attribute. * this component comes with 5 default variants ('primary' | 'secondary' | 'tertiary' | 'text' | 'dangerous'), but will accept any string, just make sure to add your own design for it! * * @property loader - When an async action is fired, the button renders a loader. this property is an overwrite for the loader renderer. * * @property actionInProgress - If given, the button becomes controlled and will only show a loader if true is passed from the outside. */ export declare class Button extends ComponentSync { protected deriveStateFromProps(nextProps: Props, state: State): State; shouldComponentUpdate(): boolean; private getClassName; private getProps; private handleAction; render(): import("react/jsx-runtime").JSX.Element; private renderContent; private renderLoader; } export declare const TS_Button: typeof Button; export {};