Modal
Components
Modal()
Modal(
props
,context
?):ReactNode
A Modal component displays content in a dialog box in a layer above the main application's content to grab the user's attention.
Parameters
Parameter | Type |
---|---|
props | ModalProps |
context ? | any |
Returns
ReactNode
Example
<Modal
show={true}
title={{
label: 'Are you sure you want to delete this?',
variant: 'h6',
}}
actions={[
{ label: 'Cancel', variant: 'secondary', onClick: handleModalClose },
{ label: 'Remove', variant: 'primary', onClick: handleRemove },
]}
onClose={handleModalClose}
>
Source
libs/design-system-core/src/components/Modal/index.tsx:53
Props
ActionsAlign
ActionsAlign:
"center"
|"end"
Source
libs/design-system-core/src/components/Modal/index.tsx:14
ModalProps
ModalProps:
PropsWithChildren
<object
>
Type declaration
Member | Type |
---|---|
actions | ButtonProps [] |
actionsAlign | ActionsAlign |
customStyle | string |
onClose | () => void |
show | boolean |
showDivider | boolean |
title | object & TextProps |