@sinchsmb/ui-kit
Version:
UI kit for SinchSMB frontend
22 lines (21 loc) • 1.23 kB
TypeScript
import { AriaAttributes, ButtonHTMLAttributes } from 'react';
import { TestIdProps } from '../../types';
export interface TriggerButtonProps extends TestIdProps, Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'onBlur' | 'onClick' | 'onKeyDown' | 'children' | 'onMouseDown' | 'tabIndex' | 'className' | 'disabled' | 'id' | 'name' | 'type' | 'value'> {
ariaLabel?: AriaAttributes['aria-label'];
ariaDescribedBy?: AriaAttributes['aria-describedby'];
ariaInvalid?: AriaAttributes['aria-invalid'];
ariaControls?: AriaAttributes['aria-controls'];
ariaErrorMessage?: AriaAttributes['aria-errormessage'];
ariaExpanded?: AriaAttributes['aria-expanded'];
ariaHasPopup?: AriaAttributes['aria-haspopup'];
ariaHidden?: AriaAttributes['aria-hidden'];
}
/**
* Button that should be used as base for creating other buttons that should have
* possibility of using as trigger in {@link Menu} or {@link SelectField}.
*
* It add some a11y props to button to make it valid when they used as trigger.
*
* Just use as usual button without any specific actions.
*/
export declare const TriggerButton: import("react").ForwardRefExoticComponent<TriggerButtonProps & import("react").RefAttributes<HTMLButtonElement>>;