@@ -22,6 +22,7 @@ import {
2222 stackComponentsActions ,
2323} from '../../../../../redux/actions' ;
2424import { toasterTypes } from '../../../../../constants' ;
25+ import { ToggleField } from '../../../common/FormElement' ;
2526
2627export const Configuration : React . FC < { stackId : TId } > = ( { stackId } ) => {
2728 const { stackComponent, flavor } = useService ( {
@@ -449,21 +450,12 @@ export const Configuration: React.FC<{ stackId: TId }> = ({ stackId }) => {
449450 return (
450451 < Box marginVertical = { 'md' } style = { { width : '100%' } } >
451452 < Box >
452- { console . log ( elementSchema , elementName , 'asdasdasda2222sdasd' ) }
453- < FlexBox . Row justifyContent = "space-between" >
454- < Paragraph > { titleCase ( elementName ) } </ Paragraph >
455- < label className = { styles . switch } >
456- < input
457- disabled
458- type = "checkbox"
459- defaultChecked = { elementSchema }
460- onChange = { ( ) =>
461- onChangeToggle ( ! elementSchema , 'other' , elementName )
462- }
463- />
464- < span className = { `${ styles . slider } ${ styles . round } ` } > </ span >
465- </ label >
466- </ FlexBox . Row >
453+ < ToggleField
454+ value = { elementSchema }
455+ onHandleChange = { ( ) => onChangeToggle ( ! elementSchema , 'other' , elementName ) }
456+ label = { titleCase ( elementName ) }
457+ disabled = { true }
458+ />
467459 </ Box >
468460 </ Box >
469461 ) ;
@@ -518,22 +510,12 @@ export const Configuration: React.FC<{ stackId: TId }> = ({ stackId }) => {
518510 </ Box >
519511 </ Container >
520512 < Container >
521- < FlexBox . Row justifyContent = "space-between" style = { { width : '70%' } } >
522- < Paragraph > Share Component with public</ Paragraph >
523- < label className = { styles . switch } >
524- { console . log ( stackComponent , 'asdasdasda2222122sdasd' ) }
525- < input
526- type = "checkbox"
527- disabled
528- defaultChecked = { stackComponent . isShared }
529- // checked={stackComponent.isShared}
530- onChange = { ( ) =>
531- onChangeToggle ( ! stackComponent . isShared , 'share' )
532- }
533- />
534- < span className = { `${ styles . slider } ${ styles . round } ` } > </ span >
535- </ label >
536- </ FlexBox . Row >
513+ < ToggleField
514+ value = { stackComponent . isShared }
515+ onHandleChange = { ( ) => onChangeToggle ( ! stackComponent . isShared , 'share' ) }
516+ label = 'Share Component with public'
517+ disabled = { true }
518+ />
537519 </ Container >
538520 </ FlexBox . Row >
539521 < FlexBox . Row style = { { width : '40%' } } >
0 commit comments