@brighthr/component-modal
v3.1.1
Published
To install, type the following into the command line at the root of your project:
Readme
Modal
To install, type the following into the command line at the root of your project:
npm i @brighthr/component-modalTo implement the Modal component into your project you’ll need to add the import:
import Modal from '@brighthr/component-modal';After adding import into your project you can use it simply like:
<Modal />Props
| Name | Type | Default | Description |
|---------------|------------------------------------------------------|-------------|-------------------------------------------------------------------------------------------------|
| allowOverflow | boolean | false | If true, the contents of the modal can display outside the modal (e.g a datepicker) |
| bgDismiss | boolean | true | If true, allows the user to close the modal by clicking outside or pressing the escape key. |
| children | React.ReactNode | | Displays the content to appear inside the modal |
| close | () => void | | Function to handle onclose. |
| color | 'primary' 'inverted' | 'primary' | Sets the color theme for the modal. |
| headerSize | 'xs' 'sm' 'base' 'lg' 'xl' '2xl' '3xl' | 'lg' | Sets the size of the title text. |
| hideDismiss | boolean | false | If true, |
| title | string | | Sets the modal title at the top of the modal. |
| width | 'xs' 'sm' 'base' 'lg' 'xl' | 'base' | Sets the modal width. |
