Skip to content

Commit 93e80ae

Browse files
committed
userInput Bind
1 parent 4932a32 commit 93e80ae

File tree

7 files changed

+25
-5
lines changed

7 files changed

+25
-5
lines changed
File renamed without changes.

src/lib/components/Input.svelte

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<script>
2+
let {
3+
title = '',
4+
placeholder = 'Enter your text here...',
5+
} = $props();
6+
</script>
7+
8+
<div class="mb-3">
9+
<label for="exampleFormControlTextarea1" class="form-label">{title}</label>
10+
<textarea
11+
bind:value={title}
12+
class="form-control"
13+
id="exampleFormControlTextarea1"
14+
{placeholder}
15+
rows="3"
16+
></textarea>
17+
</div>
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/routes/+error.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script>
22
import { page } from '$app/state';
3-
import { emojis } from '../components/emojis.js';
3+
import { emojis } from '$lib/components/emojis.js';
44
</script>
55

66
<svelte:head>

src/routes/+page.svelte

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<script>
2-
import Counter from '/src/components/Counter.svelte';
3-
import Logos from '/src/components/Logos.svelte';
4-
import Modal from '/src/components/Modal.svelte';
2+
import Counter from '$lib/components/Counter.svelte';
3+
import Logos from '$lib/components/Logos.svelte';
4+
import Modal from '$lib/components/Modal.svelte';
5+
import Input from '$lib/components/Input.svelte';
56
import { onMount } from 'svelte';
67
78
let hrefLocation = '';
@@ -38,7 +39,7 @@
3839
/>
3940
</div>
4041

41-
<div>
42+
<div class="mb-3">
4243
<a
4344
href="https://pagespeed.web.dev/report?url={hrefLocation}"
4445
target="_blank"
@@ -48,8 +49,10 @@
4849
Google PageSpeed Report
4950
</a>
5051
</div>
52+
<Input />
5153
</div>
5254

55+
5356
<p>
5457
Visit <a href="https://svelte.dev/docs/kit">svelte.dev/docs/kit</a> to read the documentation
5558
</p>

0 commit comments

Comments
 (0)