@auraxy/react-modal
Version:
A react modal component
53 lines (37 loc) • 1.26 kB
Markdown
# @auraxy/react-modal



> `pkg.module supported`, which means that you can apply tree-shaking in you project
A react modal component
## Installation
```bash
npm i -S @auraxy/react-modal
```
## Global name
`ReactModal`
## Interface
See in [index.d.ts](./index.d.ts)
## Usage
```js
import { Modal, ConfirmModal, Overlay, useShouldRender, GlobalConfig } from '@auraxy/react-modal'
```
## style
For building style, you can use the css or scss file in lib directory.
```js
// scss
import 'node_modules/@auraxy/react-modal/lib/css/index.scss'
// css
import 'node_modules/@auraxy/react-modal/lib/css/index.css'
```
Or
```scss
// scss
@import 'node_modules/@auraxy/react-modal/lib/css/index.scss'
// css
@import 'node_modules/@auraxy/react-modal/lib/css/index.css'
```
Or, you can build your custom style by copying and editing `index.scss`
## QA
1. Error `Error: spawn node-sass ENOENT`
> You may need install node-sass globally, `npm i -g node-sass`