Skip to content

Commit

Permalink
Add example in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
denisstasyev committed Aug 15, 2020
1 parent 8f4d224 commit 43eb381
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ npm i svelte-tooltip-action
| text | string | empty string | Tooltip's text |
| style | string | empty string | Your custom CSS |

You can use `style` parameter to customize position of your tooltip instance with CSS `left: ...`, `top: ...`, `right: ...`, `bottom: ...`. Sometimes it's useful to combine several rules together. For example, if you want horizontally center tooltip use: `left: 50%; width: $tooltip-width; margin-left: $tooltip-width / 2`.

## Why my overlap not working?

- Check CSS `position: relative` on your `<div />` (on `<div />` with `use:tooltip`)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svelte-tooltip-action",
"version": "1.0.1",
"version": "1.0.2",
"description": "Nice tooltip in the form of Svelte 3 action",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down

0 comments on commit 43eb381

Please sign in to comment.