28 lines
773 B
TypeScript
28 lines
773 B
TypeScript
import type { OverlayScope } from "./scope"
|
|
import { AlertHost } from "./alert"
|
|
import { ConfirmHost } from "./confirm"
|
|
import { DrawerHost } from "./drawer"
|
|
import { ModalHost } from "./modal"
|
|
import { PromptHost } from "./prompt"
|
|
import { SheetHost } from "./sheet"
|
|
import { ToastHost } from "./toast"
|
|
|
|
export interface OverlayHostProps {
|
|
scope?: OverlayScope
|
|
}
|
|
|
|
/** Convenience host for applications that use every overlay feature. */
|
|
export function OverlayHost({ scope }: OverlayHostProps) {
|
|
return (
|
|
<>
|
|
<AlertHost scope={scope} />
|
|
<ConfirmHost scope={scope} />
|
|
<PromptHost scope={scope} />
|
|
<ModalHost scope={scope} />
|
|
<SheetHost scope={scope} />
|
|
<DrawerHost scope={scope} />
|
|
<ToastHost scope={scope} />
|
|
</>
|
|
)
|
|
}
|