Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: new documentation website ✨ (#450)
- Loading branch information
Showing
41 changed files
with
4,249 additions
and
11,998 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,10 @@ node_modules | |
.cache | ||
dist | ||
coverage | ||
.docz | ||
.next | ||
out | ||
.yarn/* | ||
!.yarn/releases | ||
!.yarn/plugins | ||
.pnp.* | ||
.next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
dist | ||
.docz | ||
.next | ||
out | ||
coverage | ||
.yarn | ||
CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# react-responsive-modal | ||
|
||
[![npm version](https://img.shields.io/npm/v/react-responsive-modal.svg)](https://www.npmjs.com/package/react-responsive-modal) | ||
[![npm downloads per month](https://img.shields.io/npm/dm/react-responsive-modal.svg)](https://www.npmjs.com/package/react-responsive-modal) | ||
[![codecov](https://img.shields.io/codecov/c/github/pradel/react-responsive-modal/master.svg)](https://codecov.io/gh/pradel/react-responsive-modal) | ||
|
||
A simple responsive and accessible react modal. | ||
|
||
- Focus trap inside the modal. | ||
- Centered modals. | ||
- Scrolling modals. | ||
- Multiple modals. | ||
- Accessible modals. | ||
- Easily customizable via props. | ||
|
||
## Documentation | ||
|
||
- [Getting started](https://react-responsive-modal.leopradel.com/) | ||
- [Installation](https://react-responsive-modal.leopradel.com/#installation) | ||
- [Usage](https://react-responsive-modal.leopradel.com/#usage) | ||
- [Props](https://react-responsive-modal.leopradel.com/#props) | ||
- [Licence](https://react-responsive-modal.leopradel.com/#license) | ||
- [Examples](https://react-responsive-modal.leopradel.com/examples) | ||
- [Centered modal](https://react-responsive-modal.leopradel.com/examples#centered-modal) | ||
- [Multiple modal](https://react-responsive-modal.leopradel.com/examples#multiple-modal) | ||
- [Custom styling](https://react-responsive-modal.leopradel.com/examples#custom-styling) | ||
- [Custom animation](https://react-responsive-modal.leopradel.com/examples#custom-animation) | ||
- [Custom container](https://react-responsive-modal.leopradel.com/examples#custom-container) | ||
|
||
## Installation | ||
|
||
With npm: `npm install react-responsive-modal --save` | ||
|
||
Or with yarn: `yarn add react-responsive-modal` | ||
|
||
## Usage | ||
|
||
[![Edit react-responsive-modal](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/9jxp669j2o) | ||
|
||
```javascript | ||
import React, { useState } from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import 'react-responsive-modal/styles.css'; | ||
import { Modal } from 'react-responsive-modal'; | ||
|
||
const App = () => { | ||
const [open, setOpen] = useState(false); | ||
|
||
const onOpenModal = () => setOpen(true); | ||
const onCloseModal = () => setOpen(false); | ||
|
||
return ( | ||
<div> | ||
<button onClick={onOpenModal}>Open modal</button> | ||
<Modal open={open} onClose={onCloseModal} center> | ||
<h2>Simple centered modal</h2> | ||
</Modal> | ||
</div> | ||
); | ||
}; | ||
|
||
ReactDOM.render(<App />, document.getElementById('app')); | ||
``` | ||
|
||
## Props | ||
|
||
Check the documentation: https://react-responsive-modal.leopradel.com/#props. | ||
|
||
## License | ||
|
||
MIT © [Léo Pradel](https://www.leopradel.com/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.