@@ -4,7 +4,7 @@ import { booleanExposingStateControl } from "comps/controls/codeStateControl";
4
4
import { changeEvent , eventHandlerControl } from "comps/controls/eventHandlerControl" ;
5
5
import { LabelControl } from "comps/controls/labelControl" ;
6
6
import { styleControl } from "comps/controls/styleControl" ;
7
- import { SwitchStyle , SwitchStyleType , LabelStyle } from "comps/controls/styleControlConstants" ;
7
+ import { SwitchStyle , SwitchStyleType , LabelStyle , ComponentStyle } from "comps/controls/styleControlConstants" ;
8
8
import { migrateOldData } from "comps/generators/simpleGenerators" ;
9
9
import { Section , sectionNames } from "lowcoder-design" ;
10
10
import styled , { css } from "styled-components" ;
@@ -92,13 +92,14 @@ let SwitchTmpComp = (function () {
92
92
style : migrateOldData ( styleControl ( SwitchStyle ) , fixOldData ) ,
93
93
labelStyle : styleControl ( LabelStyle . filter ( ( style ) => [ 'accent' , 'validate' ] . includes ( style . name ) === false ) ) ,
94
94
viewRef : RefControl < HTMLElement > ,
95
-
95
+ field : styleControl ( ComponentStyle ) ,
96
96
...formDataChildren ,
97
97
} ;
98
98
return new UICompBuilder ( childrenMap , ( props ) => {
99
99
return props . label ( {
100
100
style : props . style ,
101
- labelStyle :props . labelStyle ,
101
+ labelStyle : props . labelStyle ,
102
+ field :props . field ,
102
103
children : (
103
104
< SwitchWrapper disabled = { props . disabled } $style = { props . style } >
104
105
< Switch
@@ -144,6 +145,9 @@ let SwitchTmpComp = (function () {
144
145
< Section name = { sectionNames . labelStyle } >
145
146
{ children . labelStyle . getPropertyView ( ) }
146
147
</ Section >
148
+ < Section name = { sectionNames . field } >
149
+ { children . field . getPropertyView ( ) }
150
+ </ Section >
147
151
</ >
148
152
) }
149
153
</ >
0 commit comments