-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: edit and save tag/device config with merged values
- Loading branch information
1 parent
874dba7
commit d380494
Showing
6 changed files
with
141 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
<script lang="ts"> | ||
import { SlideToggle } from '@skeletonlabs/skeleton'; | ||
export let name: string; | ||
export let value: boolean = false; | ||
export let value: boolean | undefined = false; | ||
export let onChange: (value: boolean) => void = () => {}; | ||
let change = (e: Event) => { | ||
onChange((e.target as HTMLInputElement).checked); | ||
}; | ||
</script> | ||
|
||
<SlideToggle size="sm" {name} bind:checked={value} /> | ||
<SlideToggle size="sm" {name} checked={value} on:change={change} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
<script lang="ts"> | ||
export let placeholder: string | null; | ||
export let value: unknown; | ||
export let onChange: (value: string) => void = () => {}; | ||
let change = (e: Event) => { | ||
onChange((e.target as HTMLInputElement).value); | ||
}; | ||
$: console.log(value); | ||
</script> | ||
|
||
<input | ||
class="w-full rounded-md bg-transparent border border-blue-gray-200 border-t-transparent outline outline-1 outline-secondary-400/70 p-1" | ||
type="text" | ||
{placeholder} | ||
bind:value | ||
value={value || ''} | ||
on:change={change} | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters