Close tooltip on mousedown event, add reactive, hidden icon examples (#450)

* fix(tooltip): close tooltip on mousedown event

- remove blur event from tooltip; stop click, mouse propagation on tooltip content
- remove tabindex from open tooltip to prevent outline ring
- refocus trigger icon or trigger text when closing
- remove useless programmatic variable

* docs(tooltip): add reactive example, hidden icon example
This commit is contained in:
Eric Liu 2020-12-06 05:07:32 -08:00 committed by GitHub
commit c5efb6bcd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 12 deletions

View file

@ -20,6 +20,10 @@
</p>
</Tooltip>
### Reactive example
<FileSource src="/framed/Tooltip/TooltipReactive" />
### Directions
<Tooltip triggerText="Top" direction="top"><p>Top</p></Tooltip>
@ -60,4 +64,12 @@
<p>
Resources are provisioned based on your account's organization.
</p>
</Tooltip>
### Hidden icon
<Tooltip hideIcon triggerText="Resource list">
<p>
Resources are provisioned based on your account's organization.
</p>
</Tooltip>