Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 24 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# React Dynamic Sheet

To install:
`npm i react-dynamic-sheet` or `yarn add react-dynamic-sheet`
# React Modality

Styleguide:
https://rsoury.github.io/react-dynamic-sheet/
Expand All @@ -11,28 +8,34 @@ React Dynamic Sheet is react component to provide mobile users an app like, swip
#### What does it look like?
![Demonstration of Sheet on Mobile](https://media.giphy.com/media/kcUcYwklHAE4BEdo43/giphy.gif)

#### How to use it?

## Get started

### Quick start

#### npm
```
npm install react-modality
```

#### yarn
```
yarn add react-modality
```

```jsx
import DynamicSheet from 'react-dynamic-sheet';
import { EntryButton, Box } from './your-components/'
import ModalSheet from 'react-modality';

const App = () => {
const [checkout, setCheckout] = useState(false);
const abort = () => setCheckout(false);
const startCheckout = () => setCheckout(true);
const confirmClose = true;
const MyComponent = () => {
const [isOpen, setIsOpen] = useState(false);

return (
<>
<DynamicSheet
isOpen={checkout}
onClose={abort}
confirmClose={confirmClose}
>
<Box sx={{ padding: "200px 40px" }}>Hello Checkout</Box>
</DynamicSheet>
<EntryButton onClick={startCheckout} />
<button onClick={()=> setIsOpen(!isOpen)}>Show Modal</button>
<ModalSheet isOpen={isOpen} setIsOpen={setIsOpen}>
<H1>My Content</h1>
</ModalSheet>
</>
);
}
```
```