0.2.1 • Published 2 years ago

@react-max/modal v0.2.1

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

@react-max/modal

React modal dialogs. ⚛️

NPM JavaScript Style Guide

Install

For support for react <16.8

# If you use npm:
npm install --save @react-max/modal

Or if you use Yarn:

yarn add @react-max/modal

## Usage

```tsx
import React, { Fragment, useState } from 'react'
import Modal from '@react-max/modal'

export default function App() {
  const [visible, setVisible] = useState(false);

  return (
    <Fragment>
      <button type="button" onClick={() => setVisible(true)}>
        open modal
      </button>

      <Modal
        title="Modal"
        visible={visible}
        onClose={() => setVisible(false)}
      >
        contents
      </Modal>
    </Fragment>
  );
}

Live Demo

Props

NameTypeDefaultDescription
visiblebooleanfalse
childrenReactNode
onClose() => void
titleReactNode
widthnumberstring520
zIndexnumber1000
maskbooleantrue
closeButtonReactNode
showsCloseButtonbooleantrue
isMaskClosablebooleantrue
isEscKeyClosablebooleantrue
isCenteredModebooleanfalse
isExpandedModebooleanfalse
modalClassNamestring
maskClassNamestring
bodyClassNamestring
contentClassNamestring
modalStyleCSSProperties
maskStyleCSSProperties
bodyStyleCSSProperties
contentStyleCSSProperties

Thanks

Support it by joining stargazers for this repository. :star:

License

MIT © almond-bongbong

0.2.1

2 years ago

0.2.0

2 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10-1

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8-1

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-5

4 years ago

0.0.4-4

4 years ago

0.0.4-3

4 years ago

0.0.4-2

4 years ago

0.0.4-1

4 years ago

0.0.4-0

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago