Skip to content

Update README.md #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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>
</>
);
}
```
```