DialogHost
function DialogHost(__namedParameters): Element;Host component for dialogs. Place this at the root of your app. Provides the useDialog hook to children.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
__namedParameters | DialogHostProps |
Returns
Section titled “Returns”Element
Example
Section titled “Example”function App() { return ( <DialogHost> <MyApp /> </DialogHost> );}Properties
Section titled “Properties”| Property | Type |
|---|---|
children? | ReactNode |
AlertOptions
Section titled “AlertOptions”Extended by
Section titled “Extended by”Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
backdropStyle? | Style | Style for the backdrop overlay |
buttonStyle? | Style | Base style for buttons |
focusedButtonStyle? | Style | Style for focused button state (merged with button styles) |
okButtonStyle? | Style | Style for the OK button (merged with buttonStyle) |
okText? | string | Text for the OK button (default: “OK”) |
style? | Style | Style for the dialog box |
ConfirmOptions
Section titled “ConfirmOptions”Extends
Section titled “Extends”Properties
Section titled “Properties”| Property | Type | Description | Inherited from |
|---|---|---|---|
backdropStyle? | Style | Style for the backdrop overlay | AlertOptions.backdropStyle |
buttonStyle? | Style | Base style for buttons | AlertOptions.buttonStyle |
cancelButtonStyle? | Style | Style for the Cancel button (merged with buttonStyle) | - |
cancelText? | string | Text for the Cancel button (default: “Cancel”) | - |
focusedButtonStyle? | Style | Style for focused button state (merged with button styles) | AlertOptions.focusedButtonStyle |
okButtonStyle? | Style | Style for the OK button (merged with buttonStyle) | AlertOptions.okButtonStyle |
okText? | string | Text for the OK button (default: “OK”) | AlertOptions.okText |
style? | Style | Style for the dialog box | AlertOptions.style |