0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-20 21:32:31 -05:00

fix(console): protected app form field background should exclude error message (#5379)

This commit is contained in:
Charles Zhao 2024-02-05 10:46:58 +08:00 committed by GitHub
parent d2fc3fd916
commit 265901f1b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -30,6 +30,7 @@ type Props = Omit<HTMLProps<HTMLInputElement>, 'size'> & {
// eslint-disable-next-line react/boolean-prop-naming
alwaysShowSuffix?: boolean;
isConfidential?: boolean;
inputContainerClassName?: string;
};
function TextInput(
@ -43,6 +44,7 @@ function TextInput(
readOnly,
type = 'text',
isConfidential = false,
inputContainerClassName,
...rest
}: Props,
reference: Ref<Nullable<HTMLInputElement>>
@ -96,7 +98,8 @@ function TextInput(
isConfidential && isContentHidden && type === 'text' && styles.hideTextContainerContent,
icon && styles.withIcon,
disabled && styles.disabled,
readOnly && styles.readOnly
readOnly && styles.readOnly,
inputContainerClassName
)}
>
{icon && <span className={styles.icon}>{icon}</span>}

View file

@ -120,7 +120,7 @@ function ProtectedAppForm({
tip={conditional(!hasDetailedInstructions && t('protected_app.form.url_field_tooltip'))}
>
<TextInput
className={styles.input}
inputContainerClassName={styles.input}
{...register('origin', {
required: true,
validate: (value) =>