From 1bbd84115cd0e6be3daebfd47946007ed705c5a9 Mon Sep 17 00:00:00 2001 From: Svyatoslav Kryukov Date: Tue, 22 Oct 2024 17:27:29 +0300 Subject: [PATCH] Fix code blocks --- docs/guide/load-when-visible.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/guide/load-when-visible.md b/docs/guide/load-when-visible.md index b00125f..493adaa 100644 --- a/docs/guide/load-when-visible.md +++ b/docs/guide/load-when-visible.md @@ -202,6 +202,7 @@ export default () => ( {/each} +``` == Svelte 5 @@ -223,6 +224,8 @@ export default () => ( ``` +::: + In the above example, the data will start loading 500 pixels before the element is visible. By default, the `WhenVisible` component wraps the fallback template in a `div` element so it can ensure the element is visible in the viewport. If you want to customize the wrapper element, you can provide the `as` prop.