From 3528668d86eba4562e44ce69260a9a4d7b14d40c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20R=C3=B6tsch?= Date: Mon, 26 Feb 2024 17:40:38 +0100 Subject: [PATCH] style: revert renaming of checked property in Switch component --- packages/interface-default/src/form.tsx | 2 +- packages/interface-default/src/integration.tsx | 6 +++--- packages/interface-default/src/switch.tsx | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/interface-default/src/form.tsx b/packages/interface-default/src/form.tsx index 55976c53..5d06411f 100644 --- a/packages/interface-default/src/form.tsx +++ b/packages/interface-default/src/form.tsx @@ -145,7 +145,7 @@ const ConsentForm: React.FC = ({ styles={styles} key={integration.id} Switch={Switch} - defaultChecked={formState[integration.id]} + checked={formState[integration.id]} onChange={cbToggleIntegration} {...integration} /> diff --git a/packages/interface-default/src/integration.tsx b/packages/interface-default/src/integration.tsx index a29cd5d3..96db25f5 100644 --- a/packages/interface-default/src/integration.tsx +++ b/packages/interface-default/src/integration.tsx @@ -10,7 +10,7 @@ import { Styles } from '.' export interface IntegrationProps extends IntegrationConfigOptions { styles: Styles Switch?: React.FC - defaultChecked: boolean + checked: boolean onChange: React.ChangeEventHandler } @@ -34,7 +34,7 @@ export const Integration: React.FC = ({ color, contrastColor, Icon, - defaultChecked, + checked, onChange, }) => ( <> @@ -43,7 +43,7 @@ export const Integration: React.FC = ({ onChange={onChange} name={id} styles={styles} - defaultChecked={defaultChecked} + checked={checked} >

= ({ children, - defaultChecked, + checked, className, name, styles, @@ -33,20 +33,20 @@ export const Switch: React.FC = ({ id={key} name={name} type="checkbox" - defaultChecked={defaultChecked} + defaultChecked={checked} onChange={onChange} className={styles.switchInput} />