@@ -4,7 +4,7 @@ import { booleanExposingStateControl } from "comps/controls/codeStateControl";
44import { changeEvent , eventHandlerControl } from "comps/controls/eventHandlerControl" ;
55import { LabelControl } from "comps/controls/labelControl" ;
66import { styleControl } from "comps/controls/styleControl" ;
7- import { SwitchStyle , SwitchStyleType , LabelStyle } from "comps/controls/styleControlConstants" ;
7+ import { SwitchStyle , SwitchStyleType , LabelStyle , ComponentStyle } from "comps/controls/styleControlConstants" ;
88import { migrateOldData } from "comps/generators/simpleGenerators" ;
99import { Section , sectionNames } from "lowcoder-design" ;
1010import styled , { css } from "styled-components" ;
@@ -92,13 +92,14 @@ let SwitchTmpComp = (function () {
9292 style : migrateOldData ( styleControl ( SwitchStyle ) , fixOldData ) ,
9393 labelStyle : styleControl ( LabelStyle . filter ( ( style ) => [ 'accent' , 'validate' ] . includes ( style . name ) === false ) ) ,
9494 viewRef : RefControl < HTMLElement > ,
95-
95+ field : styleControl ( ComponentStyle ) ,
9696 ...formDataChildren ,
9797 } ;
9898 return new UICompBuilder ( childrenMap , ( props ) => {
9999 return props . label ( {
100100 style : props . style ,
101- labelStyle :props . labelStyle ,
101+ labelStyle : props . labelStyle ,
102+ field :props . field ,
102103 children : (
103104 < SwitchWrapper disabled = { props . disabled } $style = { props . style } >
104105 < Switch
@@ -144,6 +145,9 @@ let SwitchTmpComp = (function () {
144145 < Section name = { sectionNames . labelStyle } >
145146 { children . labelStyle . getPropertyView ( ) }
146147 </ Section >
148+ < Section name = { sectionNames . field } >
149+ { children . field . getPropertyView ( ) }
150+ </ Section >
147151 </ >
148152 ) }
149153 </ >
0 commit comments