From b437f85bdaa5ce0471374783c9a86b143384d25e Mon Sep 17 00:00:00 2001 From: sBouzols Date: Thu, 5 Feb 2026 15:22:19 +0100 Subject: [PATCH 1/2] refactor(SwitchInput): allow SwitchProps forward in SwitchInput, otherwise it's impossible to change the Switch size for example. Signed-off-by: sBouzols --- .../inputs/reactHookForm/booleans/SwitchInput.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/inputs/reactHookForm/booleans/SwitchInput.tsx b/src/components/inputs/reactHookForm/booleans/SwitchInput.tsx index 2d1a03ab6..82cd9445d 100644 --- a/src/components/inputs/reactHookForm/booleans/SwitchInput.tsx +++ b/src/components/inputs/reactHookForm/booleans/SwitchInput.tsx @@ -8,12 +8,11 @@ import { Switch, SwitchProps } from '@mui/material'; import { BooleanInput } from './BooleanInput'; -export interface SwitchInputProps { +export interface SwitchInputProps extends SwitchProps { name: string; label?: string; - formProps?: SwitchProps; } -export function SwitchInput({ name, label, formProps, ...props }: SwitchInputProps) { - return ; +export function SwitchInput({ name, label, ...props }: SwitchInputProps) { + return ; } From 49c88446d8697b66c7df2c1463e0fdb5848bcf16 Mon Sep 17 00:00:00 2001 From: sBouzols Date: Fri, 6 Feb 2026 12:19:27 +0100 Subject: [PATCH 2/2] readonly Signed-off-by: sBouzols --- src/components/inputs/reactHookForm/booleans/SwitchInput.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/inputs/reactHookForm/booleans/SwitchInput.tsx b/src/components/inputs/reactHookForm/booleans/SwitchInput.tsx index 82cd9445d..cec92f3db 100644 --- a/src/components/inputs/reactHookForm/booleans/SwitchInput.tsx +++ b/src/components/inputs/reactHookForm/booleans/SwitchInput.tsx @@ -13,6 +13,6 @@ export interface SwitchInputProps extends SwitchProps { label?: string; } -export function SwitchInput({ name, label, ...props }: SwitchInputProps) { +export function SwitchInput({ name, label, ...props }: Readonly) { return ; }