From f05a472585b2506da21aed71f0252b2d4c04a221 Mon Sep 17 00:00:00 2001
From: Indrajith K L
Date: Mon, 5 Feb 2024 04:15:02 +0530
Subject: React Slides

* Adds useState
* State
* useEffect
* Side Effects
---
 src/lib/components/code.svelte | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 src/lib/components/code.svelte

(limited to 'src/lib/components/code.svelte')

diff --git a/src/lib/components/code.svelte b/src/lib/components/code.svelte
new file mode 100644
index 0000000..255bf7e
--- /dev/null
+++ b/src/lib/components/code.svelte
@@ -0,0 +1,22 @@
+<script lang="ts">
+	type Lines = string | boolean | null
+	type Offset = string | null
+	type Language = string | null
+
+	export let id = 'code-animation'
+	export let lines: Lines = true
+	export let offset: Offset = null
+	export let lang: Language = null
+
+	delete $$restProps.class
+</script>
+
+<pre data-id={id} class={$$props.class || ''} {...$$restProps}>
+  <code
+		data-trim
+		data-line-numbers={lines || null}
+		data-ln-start-from={offset}
+		class="language-{lang}">
+<slot />
+  </code>
+</pre>
-- 
cgit v1.2.3

