DialogAlign[] import {dialog_aligns} from '@fuzdev/fuz_ui/dialog.js'; 5 declarations
DialogAlign[] import {dialog_aligns} from '@fuzdev/fuz_ui/dialog.js'; { get: (error_message?: string | undefined) => DialogContext; get_maybe: () => DialogContext | undefined; set: (value: DialogContext) => DialogContext; } import {dialog_context} from '@fuzdev/fuz_ui/dialog.js'; DialogAlign import type {DialogAlign} from '@fuzdev/fuz_ui/dialog.js'; 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.
typetype 'button'
classtype string
styletype string
onclicktype DialogContext['close']
titletype string
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.
closeCloses the dialog. When passed an event it's swallowed (default-prevented and propagation-stopped) before closing.
type (e?: Event) => void
register_surfaceRegisters 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