Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fedorovvvv authored Jul 3, 2022
1 parent a5ff83c commit 40889d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ To set the styles, you can pass the [`onComputed`](#applying-custom-styles-on-co
import { writable } from "svelte/store";
import { arrow } from "svelte-floating-ui";
const arrowRef = writable(null);
let arrowRef:HTMLBaseElement;
const [ floatingRef, floatingContent, update] = createFloatingActions({
strategy: "absolute",
placement: "bottom",
Expand All @@ -109,7 +109,7 @@ To set the styles, you can pass the [`onComputed`](#applying-custom-styles-on-co
left: 'right',
}[placement.split('-')[0]];
Object.assign($arrowRef.style, {
Object.assign(arrowRef.style, {
left: x != null ? `${x}px` : "",
top: y != null ? `${y}px` : "",
[staticSide]: "-4px"
Expand All @@ -127,7 +127,7 @@ To set the styles, you can pass the [`onComputed`](#applying-custom-styles-on-co
{#if showTooltip}
<div class="tooltip" use:floatingContent>
Tooltip this is some longer text than the button
<div class="arrow" bind:this={$arrowRef} />
<div class="arrow" bind:this={arrowRef} />
</div>
{/if}
```

0 comments on commit 40889d9

Please sign in to comment.