File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments