File tree Expand file tree Collapse file tree
packages/pluggableWidgets/switch-native/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,16 +87,31 @@ export function Switch(props: Props): ReactElement {
8787 { labelPosition === "right" ? (
8888 < >
8989 { React . cloneElement ( switchElement , { key : "switch" } ) }
90- { labelElement && React . cloneElement ( labelElement , { key : "label" } ) }
90+ < View
91+ style = { {
92+ flexDirection : "column" ,
93+ alignItems : "flex-end"
94+ } }
95+ >
96+ { labelElement && React . cloneElement ( labelElement , { key : "label" } ) }
97+ { validationMessage }
98+ </ View >
9199 </ >
92100 ) : (
93101 < >
94- { labelElement && React . cloneElement ( labelElement , { key : "label" } ) }
102+ < View
103+ style = { {
104+ flexDirection : "column" ,
105+ alignItems : "flex-start"
106+ } }
107+ >
108+ { labelElement && React . cloneElement ( labelElement , { key : "label" } ) }
109+ { validationMessage }
110+ </ View >
95111 { React . cloneElement ( switchElement , { key : "switch" } ) }
96112 </ >
97113 ) }
98114 </ View >
99- { validationMessage }
100115 </ >
101116 ) : (
102117 // Vertical layout: label, switch, and validation message all in a column
You can’t perform that action at this time.
0 commit comments