0.2.1 • Published 2 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
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