You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
936 B

  1. <script lang="ts">
  2. import type { State } from "$lib/models/device";
  3. import type { ColorRGB } from '$lib/models/color';
  4. import BFormLine from "../bforms/BFormLine.svelte";
  5. import BFormTemperatureOption from "../bforms/BFormTemperatureOption.svelte";
  6. import BFormColorOption from "../bforms/BFormColorOption.svelte";
  7. import BFormIntensityOption from "../bforms/BFormIntensityOption.svelte";
  8. import BFormPowerOption from "../bforms/BFormPowerOption.svelte";
  9. import BFormDeleteOption from "../bforms/BFormDeleteOption.svelte";
  10. export let value: State;
  11. export let deletable: boolean = false;
  12. $: console.log(value);
  13. </script>
  14. <BFormLine>
  15. <BFormPowerOption bind:value={value.power} />
  16. <BFormIntensityOption bind:value={value.intensity} />
  17. <BFormColorOption bind:value={value.color} />
  18. <BFormTemperatureOption bind:value={value.temperature} />
  19. {#if deletable}
  20. <BFormDeleteOption on:delete />
  21. {/if}
  22. </BFormLine>