mirror of https://github.com/sveltejs/svelte
parent
6fd37e10ba
commit
7a54cbba69
@ -0,0 +1,9 @@
|
||||
<script>
|
||||
import Input from './Input.svelte';
|
||||
|
||||
export let value = '';
|
||||
|
||||
$: ({ value, ...rest } = $$props);
|
||||
</script>
|
||||
|
||||
<Input {value} name="email" aria-label="Email" />
|
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
export let value = '';
|
||||
|
||||
$: ({ value, ...rest } = $$props);
|
||||
</script>
|
||||
|
||||
<input bind:value {...rest} />
|
@ -0,0 +1,9 @@
|
||||
<script>
|
||||
import Input from './Input.svelte';
|
||||
|
||||
export let value = '';
|
||||
|
||||
$: ({ value, ...rest } = $$props);
|
||||
</script>
|
||||
|
||||
<Input {value} name="email" aria-label="Email" />
|
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
export let value = '';
|
||||
</script>
|
||||
|
||||
<input bind:value {...$$restProps} />
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
title: $$restProps
|
||||
---
|
||||
|
||||
If you want to pass down props that are not defined with `export`, you can use `$$restProps`:
|
||||
|
||||
```html
|
||||
<input {...$$restProps}/>
|
||||
```
|
Loading…
Reference in new issue