Wrapper

The Modal component wrapper.

This is a compound component.

API

This component extends the native <div> API. That's why the className prop is not included in the table.

Props
Type
Required

children

ReactNode

isOpen

boolean

maxWidth

string

height

string

onClose

() => void;

position

'top' | 'center'

children

The children in this case, because it is a compound component, should be the ones provided by this design system, listed before.

isOpen

Prop that controls if the modal is being displayed or not on the interface

maxWidth

Controls the max-width property style of the card inside of the modal.

height

Controls the height property style of the card inside of the modal.

onClose

Optional prop that closes the modal by clicking outside the card, on the x button or just by pressing the Esc key.

position

Used to set a default display position, either at the top or center of the parent.

Last updated