File tree Expand file tree Collapse file tree 3 files changed +30
-2
lines changed Expand file tree Collapse file tree 3 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 11import { FormAction , TextContent } from '../Primitives' ;
2+ import { UIElement } from './UIElement' ;
23
34export interface InputForm {
45 type : 'input' ;
@@ -10,7 +11,12 @@ export interface InputForm {
1011
1112export type InputValue = string | number | boolean ;
1213
13- export type InputElement = InputElementSlider | InputElementDropdown | InputElementText | InputElementToggle ;
14+ export type InputElement =
15+ | InputElementSlider
16+ | InputElementDropdown
17+ | InputElementText
18+ | InputElementToggle
19+ | UIElement ;
1420
1521export type InputElementSlider = {
1622 type : 'slider' ;
@@ -20,6 +26,7 @@ export type InputElementSlider = {
2026 max : number ;
2127 step : number ;
2228 defaultValue ?: number ;
29+ tooltip ?: TextContent ;
2330} ;
2431
2532export type InputElementDropdown = {
@@ -31,6 +38,7 @@ export type InputElementDropdown = {
3138 text : TextContent ;
3239 value : InputValue ;
3340 } > ;
41+ tooltip ?: TextContent ;
3442} ;
3543
3644export type InputElementText = {
@@ -39,11 +47,13 @@ export type InputElementText = {
3947 text : TextContent ;
4048 placeholder : TextContent ;
4149 defaultValue ?: string ;
50+ tooltip ?: TextContent ;
4251} ;
4352
4453export type InputElementToggle = {
4554 type : 'toggle' ;
4655 name ?: string ;
4756 text : TextContent ;
4857 defaultValue ?: boolean ;
58+ tooltip ?: TextContent ;
4959} ;
Original file line number Diff line number Diff line change 11import { FormAction , TextContent } from '../Primitives' ;
2+ import { UIElement } from './UIElement' ;
23
34export interface MultiButtonForm {
45 type : 'multi-button' ;
@@ -7,7 +8,7 @@ export interface MultiButtonForm {
78 elements : Array < MultiButtonElement > ;
89}
910
10- export type MultiButtonElement = MultiButtonElementButton ;
11+ export type MultiButtonElement = MultiButtonElementButton | UIElement ;
1112
1213export interface MultiButtonElementButton {
1314 type : 'button' ;
Original file line number Diff line number Diff line change 1+ import { TextContent } from '../Primitives' ;
2+
3+ export interface Divider {
4+ type : 'divider' ;
5+ }
6+
7+ export interface Label {
8+ type : 'label' ;
9+ text : TextContent ;
10+ }
11+
12+ export interface Header {
13+ type : 'header' ;
14+ text : TextContent ;
15+ }
16+
17+ export type UIElement = Divider | Label | Header ;
You can’t perform that action at this time.
0 commit comments