Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wd-David committed May 29, 2022
1 parent c66a402 commit 14874fd
Showing 1 changed file with 31 additions and 28 deletions.
59 changes: 31 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<h1 align="center">
<img src="https://drive.google.com/uc?id=1RdqWuFIwbLOLey2p7Dwg3QxKPM4N_LYu" alt="Svelte MultiSelect" width="50px">
<br class="hide-in-docs">&ensp;Svelte Hover Draw SVG
</h1>

<h4 align="center">
<br>A lightweight Svelte component to draw SVG on hover.</br>
<img src="https://drive.google.com/uc?id=1i1BOYb3WuSP5KpIsMoSe9aIH7-T3rzo_" alt="Svelte MultiSelect">
A lightweight Svelte component to draw SVG on hover.
<br/>

<img src="https://drive.google.com/uc?id=1i1BOYb3WuSP5KpIsMoSe9aIH7-T3rzo_" alt="Svelte MultiSelect" width="50%">
</h4>

---
Expand Down Expand Up @@ -37,41 +40,41 @@ pnpm add -D svelte-hover-draw-svg
- Inline SVG:

```svelte
<script>
import HoverDrawSVG from 'svelte-hover-draw-svg
</scrtip>
<HoverDrawSVG>
<svg>
<path />
</svg>
</HoverDrawSVG>
<script>
import HoverDrawSVG from 'svelte-hover-draw-svg';
</script>
<HoverDrawSVG>
<svg>
<path />
</svg>
</HoverDrawSVG>
```

- SVG Component (draw 2x faster than default):

```svelte
<script>
import HoverDrawSVG from 'svelte-hover-draw-svg
</scrtip>
<script>
import HoverDrawSVG from 'svelte-hover-draw-svg';
</script>
<HoverDrawSVG --draw-speed="2">
<SvgComponent />
</HoverDrawSVG>
<HoverDrawSVG --draw-speed="2">
<SvgComponent />
</HoverDrawSVG>
```

- Nested elements (expose `hovering` status):

```svelte
<script>
import HoverDrawSVG from 'svelte-hover-draw-svg
</scrtip>
<HoverDrawSVG let:hovering>
<a href="/" class:hoverEffect={hovering}>
<svg>
<path />
</svg>
</a>
</HoverDrawSVG>
<script>
import HoverDrawSVG from 'svelte-hover-draw-svg';
</script>
<HoverDrawSVG let:hovering>
<a href="/" class:hoverEffect={hovering}>
<svg>
<path />
</svg>
</a>
</HoverDrawSVG>
```

0 comments on commit 14874fd

Please sign in to comment.