Skip to main content

Modal

Components

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

ParameterType
propsModalProps
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

MemberType
actionsButtonProps[]
actionsAlignActionsAlign
customStylestring
onClose() => void
showboolean
showDividerboolean
titleobject & TextProps

Source

libs/design-system-core/src/components/Modal/index.tsx:16