diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2022-11-13 21:36:08 +0100 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2022-11-13 21:36:08 +0100 |
| commit | b30f25ce51621d62edc422a4b0743e6e8c1179d1 (patch) | |
| tree | d7d235b846bbd686dabbc7140c3b243534139cbe /src_js/vt/input.ts | |
| parent | b30a00a9713fd52865129132317beb6fa875017c (diff) | |
ui color picker
Diffstat (limited to 'src_js/vt/input.ts')
| -rw-r--r-- | src_js/vt/input.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src_js/vt/input.ts b/src_js/vt/input.ts index 749edbb..c7358ba 100644 --- a/src_js/vt/input.ts +++ b/src_js/vt/input.ts @@ -84,3 +84,19 @@ export function select( ]) ]; } + + +export function color( + value: string, + onChange: (val: string) => void +): u.VNode { + return ['input', { + props: { + type: 'color', + value: value + }, + on: { + change: (evt: Event) => onChange((evt.target as HTMLInputElement).value) + } + }]; +} |
