/*! * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ import { DomBuilderEventHandler, DomBuilderEventHandlerWithOptions, ExtendedHTMLElement, GenericEvents } from '../helper/dom'; import { OverlayHorizontalDirection, OverlayVerticalDirection } from './overlay'; export interface ButtonProps { classNames?: string[]; attributes?: Record; icon?: HTMLElement | ExtendedHTMLElement; testId?: string; label?: HTMLElement | ExtendedHTMLElement | string; confirmation?: { confirmButtonText: string; cancelButtonText: string; title: string; description?: string; }; tooltip?: string; tooltipVerticalDirection?: OverlayVerticalDirection; tooltipHorizontalDirection?: OverlayHorizontalDirection; children?: Array; disabled?: boolean; hidden?: boolean; primary?: boolean; border?: boolean; status?: 'main' | 'primary' | 'info' | 'success' | 'warning' | 'error' | 'clear' | 'dimmed-clear'; fillState?: 'hover' | 'always'; additionalEvents?: Partial>; onClick: (e: Event) => void; onHover?: (e: Event) => void; } export declare abstract class ButtonAbstract { render: ExtendedHTMLElement; updateLabel: (label: HTMLElement | ExtendedHTMLElement | string) => void; setHidden: (hidden: boolean) => void; setEnabled: (enabled: boolean) => void; hideTooltip: () => void; } export declare class Button extends ButtonAbstract { render: ExtendedHTMLElement; constructor(props: ButtonProps); updateLabel: (label: HTMLElement | ExtendedHTMLElement | string) => void; setEnabled: (enabled: boolean) => void; setHidden: (hidden: boolean) => void; hideTooltip: () => void; }