blob: ffa2633a75276ada5bef5a72fa4121719ef87794 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<script lang="ts">
type Bool = boolean | null
type Element = 'video' | 'img' | 'iframe'
export let type: Element
export let src: string
export let autoplay: Bool = null
export let preload: Bool = null
delete $$restProps.class
</script>
<svelte:element
this={type}
data-src={src}
data-autoplay={autoplay}
data-prelod={preload}
class={$$props.class || ''}
{...$$restProps}
>
<slot />
</svelte:element>
|