import type { Component, ValidComponent } from "solid-js"; import { DialogContent, type DialogContentCommonProps, type DialogContentOptions, type DialogContentRenderProps, } from "../dialog/dialog-content"; import type { ElementOf, PolymorphicProps } from "../polymorphic"; export interface AlertDialogContentOptions extends DialogContentOptions {} export interface AlertDialogContentCommonProps< T extends HTMLElement = HTMLElement, > extends DialogContentCommonProps {} export interface AlertDialogContentRenderProps extends AlertDialogContentCommonProps, DialogContentRenderProps { role: "alertdialog"; } export type AlertDialogContentProps< T extends ValidComponent | HTMLElement = HTMLElement, > = AlertDialogContentOptions & Partial>>; /** * Overrides the regular `Dialog.Content` with role="alertdialog" to interrupt the user. */ export function AlertDialogContent( props: PolymorphicProps>, ) { return ( > > > role="alertdialog" {...(props as AlertDialogContentProps)} /> ); }