2.1.0 • Published 10 months ago

@hixme-ui/modal v2.1.0

Weekly downloads
1
License
MIT
Repository
-
Last release
10 months ago

Modal

npm i --save @hixme-ui/modal

View it live

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

PropertyTypeValueRequiredDescription
backgroundColorstringN/AYesEasy way to change the modal color
hideCloseButtonbooleanfalseYesHide the default close button
styleobjectN/ANoOverride modal styles
titlestringN/ANoModal title header
zIndexnumber1001NoModal z-index value
smallbooleanfalseNoModal with 568px max-width
mediumbooleanfalseNoModal with 800px max-width
largebooleanfalseNoModal with 1024px max-width
middlebooleanfalseNoVertically align content in the center of the modal
bottombooleanfalseNoVertically align content on the bottom of the modal
contentCenterbooleanfalseNoHorizontally align content center
contentEndbooleanfalseNoHorizontally align content right
contentPaddingstringnullNoPadding for the modal content
cancelProcessingbooleanfalseNoShow processing state on cancel button
cancelSubmittingTextstringN/ANoText shown on the cancel button when cancelProcessing is true
cancelHandlerfunctiondefaultClose()NoWhen dialog = true, function called on cancel
cancelLabelstring'Cancel'NoWhen dialog = true, label on the cancel button
confirmProcessingbooleanfalseNoShow processing state on confirm button
confirmSubmittingTextstringN/ANoText shown on the confirm button when confirmProcessing is true
confirmHandlerfunctionN/ANoWhen dialog = true, function called on confirm
confirmLabelstring'Ok'NoWhen dialog = true, label on the confirm button
dialogbooleanfalseNoShow dialog modal
errorDialogbooleanfalseNoShow 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