Discrepencies between PasswordInputTheme and TextInputTheme styles while extending the same styling file InputTheme #8692
Unanswered
Ma225-kang
asked this question in
Q&A
Replies: 1 comment
|
It's because PasswordInput is built differently from TextInput. In TextInput, the So anything in your common styles that must land on the text field itself (typography, color, placeholder, text padding) is applied to the div in PasswordInput and never reaches the inner export const PasswordInputTheme: MantineThemeComponents["PasswordInput"] = {
styles: (theme: MantineTheme, params: PasswordInputProps) => {
const common = InputCommonStyles(theme, params);
const { fontSize, fontWeight, lineHeight, color } = common.input ?? {};
return { ...common, innerInput: { fontSize, fontWeight, lineHeight, color } };
},
}; |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I defined a common style in a theme file I want to apply to all my different sorts of inputs . To do achieve this I extends this file in each themeFile of each input component categories (eg: TextInputTheme ...etc).
My style apply to all my different inputs component except the InputPassword :
CommonStyle :
InputTextTheme :
PasswordInputTheme:
I found out it seem like my passwordInput load first my properties six times, to overwrite it after with default (?) properties?
Help on solving this issue would be deeply appreciated.
All reactions