UNPKG

@nexim/snackbar

Version:
58 lines 1.82 kB
import { LitElement, type PropertyValues } from 'lit'; declare global { interface HTMLElementTagNameMap { 'snack-bar': SnackbarElement; } } declare const SnackbarElement_base: import("@alwatr/type-helper").Class<import("@nexim/element").LoggerMixinInterface> & typeof LitElement; export declare class SnackbarElement extends SnackbarElement_base { /** * The content to be displayed inside the snackbar. */ content: string; /** * The label for the action button. If null, the action button will not be rendered. */ actionButtonLabel: string | null; /** * Whether to add a close button to the snackbar. */ addCloseButton: boolean; /** * Duration for the open and close animation in milliseconds. */ private static openAndCloseAnimationDuration__; protected firstUpdated(changedProperties: PropertyValues): void; /** * Close the snackbar and remove it from the DOM. * Waits for the closing animation to end before removing the element. * * @internal * This method should be used by the package API, not directly, to ensure proper signal unsubscription. */ close(): Promise<void>; /** * Handle the close button click event. * Sends a signal when the action button is clicked. */ private closeButtonClickHandler__; /** * Handle the action button click event. * Sends a signal when the action button is clicked. */ private actionButtonClickHandler__; /** * Render the snackbar component. */ protected render(): unknown; /** * Render the action button. */ private renderActionButton__; /** * Render the close button. */ private renderCloseButton__; } export {}; //# sourceMappingURL=element.d.ts.map