dialog.ts

view source

Declarations
#

5 declarations

dialog_aligns
#

dialog_context
#

dialog.ts view source

{ get: (error_message?: string | undefined) => DialogContext; get_maybe: () => DialogContext | undefined; set: (value: DialogContext) => DialogContext; } import {dialog_context} from '@fuzdev/fuz_ui/dialog.js';

DialogAlign
#

DialogCloseButtonAttrs
#

dialog.ts view source

DialogCloseButtonAttrs import type {DialogCloseButtonAttrs} from '@fuzdev/fuz_ui/dialog.js';

The attrs a custom DialogContent close_button snippet receives. Spread onto a <button> to inherit the corner-anchored close button.

type

type 'button'

class

type string

style

type string

onclick

type DialogContext['close']

title

type string

DialogContext
#

dialog.ts view source

DialogContext import type {DialogContext} from '@fuzdev/fuz_ui/dialog.js';

Set by Dialog, read by DialogContent. Lets the content surface close the dialog without the consumer threading close through the children snippet.

close

Closes the dialog. When passed an event it's swallowed (default-prevented and propagation-stopped) before closing.

type (e?: Event) => void

register_surface

Registers a content-surface element so a press inside it isn't treated as an outside-dismiss. The surface is known by node identity, independent of any class. Use as an attachment on the surface: {@attach register_surface}. Returns a cleanup that unregisters on unmount.

type (element: Element) => () => void

Depends on
#

Imported by
#