0.2.1 • Published 4 years ago
@react-max/modal v0.2.1
@react-max/modal
React modal dialogs. ⚛️
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>
);
}Props
| Name | Type | Default | Description | |
|---|---|---|---|---|
| visible | boolean | false | ||
| children | ReactNode | |||
| onClose | () => void | |||
| title | ReactNode | |||
| width | number | string | 520 | |
| zIndex | number | 1000 | ||
| mask | boolean | true | ||
| closeButton | ReactNode | |||
| showsCloseButton | boolean | true | ||
| isMaskClosable | boolean | true | ||
| isEscKeyClosable | boolean | true | ||
| isCenteredMode | boolean | false | ||
| isExpandedMode | boolean | false | ||
| modalClassName | string | |||
| maskClassName | string | |||
| bodyClassName | string | |||
| contentClassName | string | |||
| modalStyle | CSSProperties | |||
| maskStyle | CSSProperties | |||
| bodyStyle | CSSProperties | |||
| contentStyle | CSSProperties |
Thanks
Support it by joining stargazers for this repository. :star:
License
MIT © almond-bongbong
0.2.1
4 years ago
0.2.0
4 years ago
0.1.1
5 years ago
0.1.0
5 years ago
0.0.12
5 years ago
0.0.11
5 years ago
0.0.10-1
5 years ago
0.0.10
5 years ago
0.0.9
5 years ago
0.0.8-1
5 years ago
0.0.8
5 years ago
0.0.7
5 years ago
0.0.6
5 years ago
0.0.5
5 years ago
0.0.4-5
5 years ago
0.0.4-4
5 years ago
0.0.4-3
5 years ago
0.0.4-2
5 years ago
0.0.4-1
5 years ago
0.0.4-0
5 years ago
0.0.3
5 years ago
0.0.2
5 years ago
0.0.1
5 years ago