File tree Expand file tree Collapse file tree
packages/interface-default/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ const ConsentForm: React.FC<ConsentFormProps> = ({
145145 styles = { styles }
146146 key = { integration . id }
147147 Switch = { Switch }
148- defaultChecked = { formState [ integration . id ] }
148+ checked = { formState [ integration . id ] }
149149 onChange = { cbToggleIntegration }
150150 { ...integration }
151151 />
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import { Styles } from '.'
1010export interface IntegrationProps extends IntegrationConfigOptions {
1111 styles : Styles
1212 Switch ?: React . FC < SwitchProps >
13- defaultChecked : boolean
13+ checked : boolean
1414 onChange : React . ChangeEventHandler
1515}
1616
@@ -34,7 +34,7 @@ export const Integration: React.FC<IntegrationProps> = ({
3434 color,
3535 contrastColor,
3636 Icon,
37- defaultChecked ,
37+ checked ,
3838 onChange,
3939} ) => (
4040 < >
@@ -43,7 +43,7 @@ export const Integration: React.FC<IntegrationProps> = ({
4343 onChange = { onChange }
4444 name = { id }
4545 styles = { styles }
46- defaultChecked = { defaultChecked }
46+ checked = { checked }
4747 >
4848 < h2 className = { clsx ( styles . integrationFieldCategory ) } >
4949 < Trans
Original file line number Diff line number Diff line change @@ -5,15 +5,15 @@ import { Styles } from '.'
55export interface SwitchProps {
66 children : React . ReactNode
77 className : string
8- defaultChecked : boolean
8+ checked : boolean
99 name : string
1010 styles : Styles
1111 onChange : React . ChangeEventHandler
1212}
1313
1414export const Switch : React . FC < SwitchProps > = ( {
1515 children,
16- defaultChecked ,
16+ checked ,
1717 className,
1818 name,
1919 styles,
@@ -33,20 +33,20 @@ export const Switch: React.FC<SwitchProps> = ({
3333 id = { key }
3434 name = { name }
3535 type = "checkbox"
36- defaultChecked = { defaultChecked }
36+ defaultChecked = { checked }
3737 onChange = { onChange }
3838 className = { styles . switchInput }
3939 />
4040 < div
4141 className = { clsx (
4242 styles . switchSlide ,
43- defaultChecked && styles . switchSlideEnabled
43+ checked && styles . switchSlideEnabled
4444 ) }
4545 />
4646 < div
4747 className = { clsx (
4848 styles . switchNodge ,
49- defaultChecked && styles . switchNodgeEnabled
49+ checked && styles . switchNodgeEnabled
5050 ) }
5151 />
5252 </ div >
You can’t perform that action at this time.
0 commit comments