Skip to content

Commit 874fdb9

Browse files
committed
docs: 📝 Update readme with better highlights and example screenshot
1 parent 4282f71 commit 874fdb9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ react-use-modal is a custom hook that provides a flexible and reusable way to ma
66

77
## Highlights
88

9-
- Great **flexibiliy** with single _jsx_ tag updated dynamically
10-
- Small and minified **bundle size**
9+
- Great **flexibiliy**: use a single `jsx` tag updated dynamically for all the modals in you page...
10+
- ...or decouple part of the logic from the hook and manage it yourself in your page/component
11+
- **Small** and minified **bundle size**
1112
- Type safe with **TypeScript**
1213

1314
## Table of Contents
@@ -82,13 +83,16 @@ const MyPageComponent = () => {
8283
return (
8384
<>
8485
...Some page content here...
85-
<button onClick={handleOpenModal}>Open Modal</button>
86+
<div onClick={handleOpenModal} className="btn">Show modal</div>
8687
<Modal {...modalConfig} />
8788
</>
8889
);
8990
};
9091
```
9192

93+
![example1](https://user-images.githubusercontent.com/13068594/226113275-1ede9847-f6e8-4e97-87d0-d353bee5f4e0.jpg)
94+
> _Basic example: click on "Show modal" button will execute `setModalConfig` with the config we defined_.
95+
9296
## API
9397

9498
### Properties and methods

0 commit comments

Comments
 (0)