aboutsummaryrefslogtreecommitdiff
path: root/src/lib/components/slide.svelte
diff options
context:
space:
mode:
authorIndrajith K L2024-02-05 04:15:02 +0530
committerIndrajith K L2024-02-05 04:15:02 +0530
commitf05a472585b2506da21aed71f0252b2d4c04a221 (patch)
tree4f65a3801f29250a049f3cc5cd2ac9c0a41d78f9 /src/lib/components/slide.svelte
downloadreact-hooks-training-f05a472585b2506da21aed71f0252b2d4c04a221.tar.gz
react-hooks-training-f05a472585b2506da21aed71f0252b2d4c04a221.tar.bz2
react-hooks-training-f05a472585b2506da21aed71f0252b2d4c04a221.zip
React Slides
* Adds useState * State * useEffect * Side Effects
Diffstat (limited to 'src/lib/components/slide.svelte')
-rw-r--r--src/lib/components/slide.svelte48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/lib/components/slide.svelte b/src/lib/components/slide.svelte
new file mode 100644
index 0000000..439d312
--- /dev/null
+++ b/src/lib/components/slide.svelte
@@ -0,0 +1,48 @@
+<script lang="ts">
+ type Bool = boolean | null
+ type String = string | null
+ type Transition =
+ | 'none'
+ | 'fade'
+ | 'slide'
+ | 'convex'
+ | 'concave'
+ | 'zoom'
+ | null
+
+ export let animate: Bool = null
+ export let animateEasing: String = null
+ export let animateUnmatched: Bool = null
+ export let animateId: String = null
+ export let animateRestart: Bool = null
+ export let background: String = null
+ export let gradient: String = null
+ export let image: String = null
+ export let video: String = null
+ export let iframe: String = null
+ export let interactive: Bool = null
+ export let transition: Transition = null
+
+ delete $$restProps.class
+</script>
+
+<section
+ on:in
+ on:out
+ data-auto-animate={animate}
+ data-auto-animate-easing={animateEasing}
+ data-auto-animate-unmatched={animateUnmatched}
+ data-auto-animate-id={animateId}
+ data-auto-animate-restart={animateRestart}
+ data-background-color={background}
+ data-background-gradient={gradient}
+ data-background-image={image}
+ data-background-video={video}
+ data-background-iframe={iframe}
+ data-background-interactive={interactive}
+ data-transition={transition}
+ class={$$props.class || ''}
+ {...$$restProps}
+>
+ <slot />
+</section>