From 20a51c6653d1557470ea520d0f263536e468b697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Mon, 25 Sep 2023 10:05:28 +0200 Subject: [PATCH] Omit some props --- site/source/design-system/field/NumberField.tsx | 5 +++-- site/source/design-system/field/TextField.tsx | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/site/source/design-system/field/NumberField.tsx b/site/source/design-system/field/NumberField.tsx index 24391efc7..52d027979 100644 --- a/site/source/design-system/field/NumberField.tsx +++ b/site/source/design-system/field/NumberField.tsx @@ -113,11 +113,12 @@ export default function NumberField(props: NumberFieldProps) { > )} {...inputWithCursorHandlingProps} placeholder={ diff --git a/site/source/design-system/field/TextField.tsx b/site/source/design-system/field/TextField.tsx index 52516542e..24dff2357 100644 --- a/site/source/design-system/field/TextField.tsx +++ b/site/source/design-system/field/TextField.tsx @@ -25,7 +25,11 @@ export default function TextField(props: TextFieldProps) { $hasLabel={!!props.label && !props.small} > )} + {...(omit( + props, + 'label', + 'errorMessage' + ) as HTMLAttributes)} {...(inputProps as HTMLAttributes)} placeholder={ (inputProps as HTMLAttributes).placeholder ??