2.1.0 • Published 10 months ago
@hixme-ui/modal v2.1.0
Modal
npm i --save @hixme-ui/modal
Usage
import Modal from '@hixme-ui/modal'
<Modal
dialog
medium
title='All your base are belong to us'
confirmLabel='Get down!'
cancelLabel='Eh, maybe not...'
>
{/* Modal content here */}
</Modal>
Props
Property | Type | Value | Required | Description |
---|---|---|---|---|
backgroundColor | string | N/A | Yes | Easy way to change the modal color |
hideCloseButton | boolean | false | Yes | Hide the default close button |
style | object | N/A | No | Override modal styles |
title | string | N/A | No | Modal title header |
zIndex | number | 1001 | No | Modal z-index value |
small | boolean | false | No | Modal with 568px max-width |
medium | boolean | false | No | Modal with 800px max-width |
large | boolean | false | No | Modal with 1024px max-width |
middle | boolean | false | No | Vertically align content in the center of the modal |
bottom | boolean | false | No | Vertically align content on the bottom of the modal |
contentCenter | boolean | false | No | Horizontally align content center |
contentEnd | boolean | false | No | Horizontally align content right |
contentPadding | string | null | No | Padding for the modal content |
cancelProcessing | boolean | false | No | Show processing state on cancel button |
cancelSubmittingText | string | N/A | No | Text shown on the cancel button when cancelProcessing is true |
cancelHandler | function | defaultClose() | No | When dialog = true , function called on cancel |
cancelLabel | string | 'Cancel' | No | When dialog = true , label on the cancel button |
confirmProcessing | boolean | false | No | Show processing state on confirm button |
confirmSubmittingText | string | N/A | No | Text shown on the confirm button when confirmProcessing is true |
confirmHandler | function | N/A | No | When dialog = true , function called on confirm |
confirmLabel | string | 'Ok' | No | When dialog = true , label on the confirm button |
dialog | boolean | false | No | Show dialog modal |
errorDialog | boolean | false | No | Show error dialog modal |
Styling
The default style is a full screen modal. You can specify small
, medium
, or large
to render a more traditional modal style. Any of the preset modal styles can be overwritten by providing the <MrModal />
component with a style object.
style: {
content: {
...contentStyles
},
overlay: {
...overlayStyles
},
}
2.1.0
10 months ago
2.0.0-alpha.13
12 months ago
2.0.0
12 months ago
3.0.2
2 years ago
2.0.0-alpha.12
3 years ago
2.0.0-alpha.7
3 years ago
2.0.0-alpha.8
3 years ago
2.0.0-alpha.9
3 years ago
2.0.0-alpha.11
3 years ago
2.0.0-alpha.3
3 years ago
2.0.0-alpha.10
3 years ago
2.0.0-alpha.4
3 years ago
2.0.0-alpha.5
3 years ago
2.0.0-alpha.6
3 years ago
2.0.0-alpha.2
3 years ago
1.20.7
3 years ago
1.20.4
5 years ago
1.20.2
5 years ago
1.20.1
6 years ago
2.0.0-alpha.0
6 years ago
1.20.0
6 years ago
1.19.2
6 years ago
1.17.2
6 years ago
1.17.1
6 years ago
1.16.8
6 years ago
1.16.5
6 years ago
1.16.2
6 years ago
1.16.1
6 years ago