mirror of
https://github.com/IoTManagerProject/IoTManagerWeb.git
synced 2026-03-30 20:09:24 +03:00
add 2 example of input component
This commit is contained in:
@@ -5,8 +5,10 @@
|
|||||||
//router.mode.memory(); // enables in-memory navigation method
|
//router.mode.memory(); // enables in-memory navigation method
|
||||||
import Card from "./Card.svelte";
|
import Card from "./Card.svelte";
|
||||||
import Input from "./Input.svelte";
|
import Input from "./Input.svelte";
|
||||||
let text = "";
|
let text1 = "";
|
||||||
const handleChange = value => (text = value); //
|
let text2 = "";
|
||||||
|
const handleChange1 = value => (text1 = value);
|
||||||
|
const handleChange2 = value => (text2 = value);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
@@ -144,9 +146,13 @@
|
|||||||
</Route>
|
</Route>
|
||||||
|
|
||||||
<Route path="/test">
|
<Route path="/test">
|
||||||
<Card title="Testing card">
|
<Card title="Testing card1">
|
||||||
<Input onChange={handleChange} title="Input text" />
|
<Input onChange={handleChange1} title="Input text1" />
|
||||||
<h1>{text}</h1>
|
<h1>{text1}</h1>
|
||||||
|
</Card>
|
||||||
|
<Card title="Testing card2">
|
||||||
|
<Input onChange={handleChange2} title="Input text2" />
|
||||||
|
<h1>{text2}</h1>
|
||||||
</Card>
|
</Card>
|
||||||
</Route>
|
</Route>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user