Skip to content

Commit

Permalink
docs: update examples texts 📃 (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
willnguyen1312 authored May 10, 2023
1 parent e72271d commit ddb0193
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 20 deletions.
9 changes: 6 additions & 3 deletions examples/preact-ts/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ function App() {
</nav>

{zoomType === "wheel" && (
<div ref={imageWheelContainerRef} id="image-wheel-container" class="w-[300px] h-[300px] cursor-crosshair">
<img class="w-full h-full" alt="Large Pic" src="/large.webp" />
</div>
<>
<p>Scroll inside the image to see zoom in-out effect</p>
<div ref={imageWheelContainerRef} id="image-wheel-container" class="w-[300px] h-[300px] cursor-crosshair">
<img class="w-full h-full" alt="Large Pic" src="/large.webp" />
</div>
</>
)}

{zoomType === "hover" && (
Expand Down
9 changes: 6 additions & 3 deletions examples/qwik-ts/src/routes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,12 @@ export default component$(() => {
</nav>

{zoomType.value === "wheel" && (
<div ref={imageWheelContainerRef} id="image-wheel-container" class="w-[300px] h-[300px] cursor-crosshair">
<img class="w-full h-full" alt="Large Pic" src="/large.webp" />
</div>
<>
<p>Scroll inside the image to see zoom in-out effect</p>
<div ref={imageWheelContainerRef} id="image-wheel-container" class="w-[300px] h-[300px] cursor-crosshair">
<img class="w-full h-full" alt="Large Pic" src="/large.webp" />
</div>
</>
)}

{zoomType.value === "hover" && (
Expand Down
9 changes: 6 additions & 3 deletions examples/react-ts/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,12 @@ function App() {
</nav>

{zoomType === "wheel" && (
<div ref={imageWheelContainerRef} id="image-wheel-container" className="w-[300px] h-[300px] cursor-crosshair">
<img className="w-full h-full" alt="Large Pic" src="/large.webp" />
</div>
<>
<p>Scroll inside the image to see zoom in-out effect</p>
<div ref={imageWheelContainerRef} id="image-wheel-container" className="w-[300px] h-[300px] cursor-crosshair">
<img className="w-full h-full" alt="Large Pic" src="/large.webp" />
</div>
</>
)}

{zoomType === "hover" && (
Expand Down
9 changes: 6 additions & 3 deletions examples/solid-ts/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,12 @@ const App: Component = () => {
</nav>

{zoomType() === "wheel" && (
<div ref={imageWheelContainer} id="image-wheel-container" class="w-[300px] h-[300px] cursor-crosshair">
<img class="w-full h-full" alt="Large Pic" src="/large.webp" elementtiming="" fetchpriority="high" />
</div>
<>
<p>Scroll inside the image to see zoom in-out effect</p>
<div ref={imageWheelContainer} id="image-wheel-container" class="w-[300px] h-[300px] cursor-crosshair">
<img class="w-full h-full" alt="Large Pic" src="/large.webp" elementtiming="" fetchpriority="high" />
</div>
</>
)}

{zoomType() === "hover" && (
Expand Down
1 change: 1 addition & 0 deletions examples/svelte-ts/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
</nav>

{#if zoomType === "wheel"}
<p>Scroll inside the image to see zoom in-out effect</p>
<div bind:this={imageWheelContainer} id="image-wheel-container" class="w-[300px] h-[300px] cursor-crosshair">
<img class="w-full h-full" alt="Large Pic" src="/large.webp" />
</div>
Expand Down
1 change: 1 addition & 0 deletions examples/vanilla-ts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
</nav>

<template id="image-wheel">
<p>Scroll inside the image to see zoom in-out effect</p>
<div id="image-wheel-container" class="w-[300px] h-[300px] cursor-crosshair">
<img class="w-full h-full" alt="Large Pic" src="/large.webp" />
</div>
Expand Down
14 changes: 6 additions & 8 deletions examples/vue-ts/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,12 @@ onUnmounted(() => {
>
</nav>

<div
v-if="zoomType === 'wheel'"
ref="imageWheelContainerRef"
id="image-wheel-container"
class="w-[300px] h-[300px] cursor-crosshair"
>
<img class="w-full h-full" alt="Large Pic" src="/large.webp" />
</div>
<template v-if="zoomType === 'wheel'">
<p>Scroll inside the image to see zoom in-out effect</p>
<div ref="imageWheelContainerRef" id="image-wheel-container" class="w-[300px] h-[300px] cursor-crosshair">
<img class="w-full h-full" alt="Large Pic" src="/large.webp" />
</div>
</template>

<div
v-if="zoomType === 'hover'"
Expand Down

0 comments on commit ddb0193

Please sign in to comment.