Skip to content

Commit

Permalink
Rename WhenVisible "elementTag" prop to "as"
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroborges committed Oct 10, 2024
1 parent 3701734 commit 74a396e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/svelte/src/components/WhenVisible.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
export let data: string | string[] = ''
export let params: ReloadOptions = {}
export let buffer: number = 0
export let elementTag: keyof HTMLElementTagNameMap = 'div'
export let as: keyof HTMLElementTagNameMap = 'div'
export let always: boolean = false
let loaded = false
Expand Down Expand Up @@ -77,7 +77,7 @@
</script>

{#if always || !loaded}
<svelte:element this={elementTag} bind:this={el} />
<svelte:element this={as} bind:this={el} />
{/if}

{#if loaded}
Expand Down

0 comments on commit 74a396e

Please sign in to comment.