Update base components

This commit is contained in:
jeffvli
2022-10-26 15:59:18 -07:00
parent dc891e1b79
commit f8e1a7d79e
4 changed files with 47 additions and 13 deletions
+21 -2
View File
@@ -8,11 +8,11 @@ import {
} from '@mantine/core';
interface TextInputProps extends MantineTextInputProps {
children: React.ReactNode;
children?: React.ReactNode;
}
interface PasswordInputProps extends MantinePasswordInputProps {
children: React.ReactNode;
children?: React.ReactNode;
}
const StyledTextInput = styled(MantineTextInput)<TextInputProps>`
@@ -30,6 +30,17 @@ const StyledTextInput = styled(MantineTextInput)<TextInputProps>`
&:focus-within {
border-color: var(--primary-color);
}
color: var(--input-fg);
background: var(--input-bg);
&::placeholder {
color: var(--input-placeholder-fg);
}
}
& .mantine-Input-icon {
color: var(--input-placeholder-fg);
}
& .mantine-TextInput-required {
@@ -77,3 +88,11 @@ export const PasswordInput = forwardRef<HTMLInputElement, PasswordInputProps>(
);
}
);
TextInput.defaultProps = {
children: null,
};
PasswordInput.defaultProps = {
children: null,
};