From 815323a5674a80d9052b67a64b210e5f4f417fd7 Mon Sep 17 00:00:00 2001 From: Sidney Alcantara Date: Thu, 11 Nov 2021 18:15:01 +1100 Subject: [PATCH] text fields always display placeholders --- src/theme/components.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/theme/components.tsx b/src/theme/components.tsx index 397582f3..4f1a73f1 100644 --- a/src/theme/components.tsx +++ b/src/theme/components.tsx @@ -318,6 +318,14 @@ export const components = (theme: Theme): ThemeOptions => { paddingTop: theme.spacing(1.5), paddingBottom: theme.spacing(13 / 8), height: toRem(23), + + ".MuiInputBase-root .MuiFilledInput-input.MuiInputBase-input&::placeholder": + { + // https://github.com/mui-org/material-ui/blob/master/packages/mui-material/src/InputBase/InputBase.js#L136 + opacity: `${ + theme.palette.mode === "light" ? 0.42 : 0.5 + } !important`, + }, }, inputSizeSmall: { padding: theme.spacing(0.75, 1.5),