diff --git a/README.md b/README.md index 18dfaeb..a1f5e3a 100644 --- a/README.md +++ b/README.md @@ -171,14 +171,26 @@ You can use `interactive` prop and `html` for your interactive tooltip ## Show/hide your tooltip manually ```javascript + +state = { + open: false, +} + +// ... + {console.log('call'); setIsOpen(false)}} + open={this.state.open} > - { setIsOpen(true) }}> - This will show {tooltipContent} - +

{ + this.setState(state => ({ + open: !state.open, + })); + setTimeout(() => alert('can do things after delay'), 2000); + }} + > + Clicking me will initiate manual open/close tooltip logic +

```