feat(overlays): add managed overlay package
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
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} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user