File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed
src/components/dialogItems Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 10
10
11
11
let colorPicker = new ColorPicker (` ${PACKAGE .name }:${label }-color_picker ` , {
12
12
onChange() {
13
+ // @ts-ignore
13
14
const color = colorPicker .get () as tinycolor .Instance
14
15
value .set (color .toHexString ())
15
16
},
Original file line number Diff line number Diff line change
1
+ <script lang =" ts" >
2
+ import { Valuable } from ' ../../util/stores'
3
+ import BaseDialogItem from ' ./baseDialogItem.svelte'
4
+
5
+ export let label: string
6
+ export let tooltip: string = ' '
7
+ export let options: Record <string , string >
8
+ export let defaultSelection: string []
9
+ export let selection: Valuable <boolean []>
10
+
11
+ function toggleOption(option : number ) {
12
+ selection .get ()[option ] = ! selection .get ()[option ]
13
+ selection .set (selection .get ())
14
+ }
15
+ </script >
16
+
17
+ <BaseDialogItem {label } {tooltip }>
18
+ <div class =" dialog_bar form_bar checkbox_bar" >
19
+ <label class ="name_space_left" for ="export" >{label }</label >
20
+ <div class =" spacer" />
21
+ <div >
22
+ {#each $selection as value , i }
23
+ <input type ="checkbox" class ="focusable_input" id ="export" bind:checked ={value } />
24
+ {/each }
25
+ </div >
26
+ </div >
27
+ </BaseDialogItem >
28
+
29
+ <style >
30
+ .checkbox_bar {
31
+ flex-direction : row ;
32
+ align-items : center ;
33
+ }
34
+ .spacer {
35
+ flex-grow : 1 ;
36
+ border-bottom : 2px dashed var (--color-button );
37
+ height : 0px ;
38
+ margin : 8px ;
39
+ margin-left : 16px ;
40
+ }
41
+ label {
42
+ width : auto ;
43
+ }
44
+ </style >
You can’t perform that action at this time.
0 commit comments