From 04699e49ab4f8dd60b03ad73111fac31b57712c2 Mon Sep 17 00:00:00 2001 From: Brion Date: Tue, 22 Oct 2024 20:07:51 +0530 Subject: [PATCH] fix(react): remove `MuiOutlinedInput` unwanted padding override --- .../react/src/components/TextField/TextField.tsx | 14 +++++++++++--- packages/react/src/theme/default-theme.ts | 7 ------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/packages/react/src/components/TextField/TextField.tsx b/packages/react/src/components/TextField/TextField.tsx index 8211723a..8a47a429 100644 --- a/packages/react/src/components/TextField/TextField.tsx +++ b/packages/react/src/components/TextField/TextField.tsx @@ -175,7 +175,7 @@ const PasswordFieldWithCriteria: ForwardRefExoticComponent = for */ const TextField: OverridableComponent> = forwardRef( ( - {className, id, label, type, InputLabelProps, variant, ...rest}: TextFieldProps, + {className, id, label, type, InputLabelProps, variant, size = 'small', ...rest}: TextFieldProps, ref: Ref, ): ReactElement => { const classes: string = clsx('oxygen-text-field', className); @@ -186,9 +186,17 @@ const TextField: OverridableComponent> = forw {label} {type === TextFieldInputTypes.INPUT_PASSWORD ? ( - + ) : ( - + )} ); diff --git a/packages/react/src/theme/default-theme.ts b/packages/react/src/theme/default-theme.ts index cd05d82f..0202ee17 100644 --- a/packages/react/src/theme/default-theme.ts +++ b/packages/react/src/theme/default-theme.ts @@ -153,13 +153,6 @@ export const generateDefaultThemeOptions = (baseTheme: Theme): RecursivePartial< }, }, }, - MuiOutlinedInput: { - styleOverrides: { - input: { - padding: '0.67857143em 1em', - }, - }, - }, MuiTypography: { defaultProps: { variantMapping: {