0.0.27 • Published 3 years ago

@jmind.systems/react-modal v0.0.27

Weekly downloads
21
License
MIT
Repository
github
Last release
3 years ago

React-Modal

aphrodite is required for react-modal to work

Example

codesandbox

Docs

  • addModal - takes a modal name. Use to open modal.
  • removeModal - takes a modal name. Use to close modal.
  • subscribeToModal: (name, callback: (isOpen)) - callback will be trigger on modal open/close
  • name: string - The modal name should be unique
  • children: ReactNode - modal content
  • type: string: submit, confirm, custom
  • onClose?: function
  • onSubmit?: function - will be triggered when the user clicks on submit button
  • settings?: object - use this parameter to pass custom settings:
    1. rootStyles: object
    2. overlayStyles: object
    3. withCloseBtn: boolean (default true) - Using this prop you can show
      or hide close btn (cross.svg)
    4. closeStyles: object
      1. svg: object - Use to change close btn position, size, etc.
      2. path: object - Use to change close button color
  • controlsSettings?: object
    1. cancel: object - cancel button settings.
      1. text: string | React.Element - cancel button text
      2. styles: object - styles for cancel button. Use this
        parameter to change default button styles.
    2. submit: object - submit button settings
      1. text: string | React.Element - submit button text
      2. styles: object - styles for submit button. Use this
        parameter to change default button styles.
    3. wrapper: object - There is a parant div around cancel and submit buttons. Use this parameter to change wrapper style (margin, background, etc.)
  • closeIcon?: function This prop can be used to pass custom close component, for example text.
  • portalId?:string (default - modal) - By default you should have root div with id="modal" ().
0.0.27

3 years ago

0.0.25

4 years ago

0.0.26

4 years ago

0.0.24

4 years ago

0.0.23

4 years ago

0.0.22

4 years ago

0.0.21

4 years ago

0.0.20

4 years ago

0.0.19

4 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.16

4 years ago

0.0.15

4 years ago

0.0.13

4 years ago

0.0.14

4 years ago

0.0.10

4 years ago

0.0.11

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago