@@ -26,33 +26,32 @@ export function TextField(props: any) {
2626 ) ;
2727}
2828
29- export function ToggleField ( props : any ) {
30- const { name, onHandleChange, label } = props ;
31- return (
32- < Box marginVertical = "md" >
33- < FlexBox . Row justifyContent = "space-between" alignItems = "center" >
34- < Box >
35- < Paragraph size = "body" style = { { color : '#000' } } >
36- { label }
37- </ Paragraph >
38- </ Box >
39- < Box >
40- < label className = { styles . switch } >
41- < input
42- defaultChecked = { props ?. default }
43- type = "checkbox"
44- onChange = { ( event ) => onHandleChange ( name , event . target . checked ) }
45- />
46- < span className = { `${ styles . slider } ${ styles . round } ` } > </ span >
47- </ label >
48- </ Box >
49- </ FlexBox . Row >
50- </ Box >
51- ) ;
52- }
29+ // export function ToggleField(props: any) {
30+ // const { name, onHandleChange, label } = props;
31+ // return (
32+ // <Box marginVertical="md">
33+ // <FlexBox.Row justifyContent="space-between" alignItems="center">
34+ // <Box>
35+ // <Paragraph size="body" style={{ color: '#000' }}>
36+ // {label}
37+ // </Paragraph>
38+ // </Box>
39+ // <Box>
40+ // <label className={styles.switch}>
41+ // <input
42+ // type="checkbox"
43+ // onChange={(event) => onHandleChange(name, event.target.checked)}
44+ // />
45+ // <span className={`${styles.slider} ${styles.round}`}></span>
46+ // </label>
47+ // </Box>
48+ // </FlexBox.Row>
49+ // </Box>
50+ // );
51+ // }
5352
54- export function ToggleFieldBlock ( props : any ) {
55- const { name, value, onHandleChange, label } = props ;
53+ export function ToggleField ( props : any ) {
54+ const { name, value, onHandleChange, label, disabled } = props ;
5655 return (
5756 < Box style = { { height : '68px' } } >
5857 < FlexBox . Row justifyContent = "space-between" flexDirection = "column" >
@@ -62,16 +61,13 @@ export function ToggleFieldBlock(props: any) {
6261 </ Paragraph >
6362 </ Box >
6463 < FlexBox . Row className = { styles . switchContainer } >
65- < div >
66- < span className = { styles . switchLabel } >
67- { value ? < > Yes</ > : < > No</ > }
68- </ span >
69- </ div >
64+ < div className = { styles . switchLabel } > < span > { value ? < > Yes</ > : < > No</ > } </ span > </ div >
7065 < label className = { styles . switch } >
7166 < input
7267 type = "checkbox"
7368 defaultChecked = { value }
7469 onChange = { ( event ) => onHandleChange ( name , event . target . checked ) }
70+ disabled = { disabled }
7571 />
7672 < span className = { `${ styles . sliderBlue } ${ styles . round } ` } > </ span >
7773 </ label >
0 commit comments