@@ -26,32 +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- 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- }
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+ // }
5252
53- export function ToggleFieldBlock ( props : any ) {
54- const { name, value, onHandleChange, label } = props ;
53+ export function ToggleField ( props : any ) {
54+ const { name, value, onHandleChange, label, disabled } = props ;
5555 return (
5656 < Box style = { { height : '68px' } } >
5757 < FlexBox . Row justifyContent = "space-between" flexDirection = 'column' >
@@ -61,11 +61,12 @@ export function ToggleFieldBlock(props: any) {
6161 </ Paragraph >
6262 </ Box >
6363 < FlexBox . Row className = { styles . switchContainer } >
64- < div > < span className = { styles . switchLabel } > { value ? < > Yes</ > : < > No</ > } </ span > </ div >
64+ < div className = { styles . switchLabel } > < span > { value ? < > Yes</ > : < > No</ > } </ span > </ div >
6565 < label className = { styles . switch } >
6666 < input
6767 type = "checkbox"
6868 onChange = { ( event ) => onHandleChange ( name , event . target . checked ) }
69+ disabled = { disabled }
6970 />
7071 < span className = { `${ styles . sliderBlue } ${ styles . round } ` } > </ span >
7172 </ label >
0 commit comments