Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrohenriquepires committed Mar 15, 2024
1 parent 2566fde commit f7f2672
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,23 @@ const showPrompt = async () => {
console.log(`User name is ${name || 'a mistery'}`)
}
```

## Modal Dialog

```tsx
import { simpleModal } from 'react-simple-dialogs'

const showPrompt = async () => {
await simpleModal(closeFn => (
<div>
<h1>My modal</h1>

<p>My modal content, I can use this for anything I want!</p>

<button onClick={closeFn}>Close</button>
</div>
))

console.log('Modal was closed')
}
```

0 comments on commit f7f2672

Please sign in to comment.