Currently, I am attempting to customize a TextField component in a unique way using the sx
prop:
<TextField
size="small"
sx={{
padding: '1px 3px',
fontSize: '0.875rem',
lineHeight: '1.25rem',
}}
{...params}
/>
I am working with MUI v5 framework. However, upon inspecting the input element, it appears that the styles are not being applied. What could be causing this issue?
UPDATE: Upon further investigation, it seems that the styles are actually being applied to the wrapper element through its generated class. Nevertheless, my intention is to style the input element directly.
I also attempted to utilize inputProps
, but unfortunately, it did not yield any results.