svelte-aria-dialog
Version:
A tiny svelte component that provides a mostly unstyled, WAI-ARIA accessible modal dialog with a few simple options.
44 lines (43 loc) • 1.21 kB
TypeScript
import { SvelteComponentTyped } from "svelte";
declare const __propDef: {
props: {
[x: string]: any;
open?: boolean;
title?: string;
closable?: boolean;
append?: HTMLElement;
class?: string;
};
events: {
click: MouseEvent;
backdropclick: CustomEvent<any>;
open: CustomEvent<any>;
close: CustomEvent<any>;
} & {
[evt: string]: CustomEvent<any>;
};
slots: {
default: {};
footer: {};
outer: {};
};
};
export declare type DialogProps = typeof __propDef.props;
export declare type DialogEvents = typeof __propDef.events;
export declare type DialogSlots = typeof __propDef.slots;
/**
* An ARIA accessible Dialog component for displaying important information to users.
* - Basic Usage:
* ```tsx
* <Dialog bind:open title="Title">
* This is a simple Dialog.
* <svelte:fragment slot="footer">
* <button>Option 1</button>
* <button>Option 2</button>
* </svelte:fragment>
* </Dialog>
* ```
*/
export default class Dialog extends SvelteComponentTyped<DialogProps, DialogEvents, DialogSlots> {
}
export {};