aboutsummaryrefslogtreecommitdiff
path: root/src_js/vt/input.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src_js/vt/input.ts')
-rw-r--r--src_js/vt/input.ts16
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)
+ }
+ }];
+}