π OpenHands: AI-Driven Development
fix: use theme colors for form validation (#18199)
Engel Nyst553d45191131
diff --git a/__tests__/components/features/settings/secrets-settings/secret-form-behavior.test.tsx b/__tests__/components/features/settings/secrets-settings/secret-form-behavior.test.tsxindex 04f4783a1a..60d280a8ae 100644--- a/__tests__/components/features/settings/secrets-settings/secret-form-behavior.test.tsx+++ b/__tests__/components/features/settings/secrets-settings/secret-form-behavior.test.tsx@@ -225,10 +225,9 @@ describe("Secret form behavior", () => {await user.type(screen.getByTestId("value-input"), "secret-value");await user.click(screen.getByTestId("submit-button"));- expect(screen.getByText(I18nKey.SECRETS$SECRET_ALREADY_EXISTS)).toHaveClass(- "text-red-500",- "text-sm",- );+ expect(+ screen.getByText(I18nKey.SECRETS$SECRET_ALREADY_EXISTS),+ ).toBeVisible();expect(mocks.create).not.toHaveBeenCalled();});diff --git a/src/components/features/settings/llm-profiles/profile-name-input.tsx b/src/components/features/settings/llm-profiles/profile-name-input.tsxindex acb11acbf5..7f45e8d0d4 100644--- a/src/components/features/settings/llm-profiles/profile-name-input.tsx+++ b/src/components/features/settings/llm-profiles/profile-name-input.tsx@@ -67,7 +67,7 @@ export const ProfileNameInput = forwardRef<<pid={describedById}data-testid={ruleTestId}- className={cn("text-xs", isValid ? "text-muted" : "text-red-400")}+ className={cn("text-xs", isValid ? "text-muted" : "text-danger")}>{t(I18nKey.SETTINGS$PROFILE_NAME_RULE)}</p>diff --git a/src/components/features/settings/secrets-settings/secret-form.tsx b/src/components/features/settings/secrets-settings/secret-form.tsxindex fe2e5279f4..6edf0eea6c 100644--- a/src/components/features/settings/secrets-settings/secret-form.tsx+++ b/src/components/features/settings/secrets-settings/secret-form.tsx@@ -164,7 +164,7 @@ export function SecretForm({pattern="^[a-zA-Z][a-zA-Z0-9_]{0,63}$"title={t(I18nKey.SETTINGS$SECRET_NAME_PATTERN_TITLE)}/>- {error && <p className="text-red-500 text-sm">{error}</p>}+ {error && <p className="text-danger text-sm">{error}</p>}<label className="flex flex-col gap-2.5 w-full min-w-0"><span className="text-sm">diff --git a/src/components/features/settings/settings-input.tsx b/src/components/features/settings/settings-input.tsxindex a26804f86c..14d37ca616 100644--- a/src/components/features/settings/settings-input.tsx+++ b/src/components/features/settings/settings-input.tsx@@ -94,7 +94,7 @@ export const SettingsInput = forwardRef<HTMLInputElement, SettingsInputProps>({startContent}<span className={cn("text-sm", labelClassName)}>{label}</span>{showRequiredTag && (- <span className="text-red-400 text-sm leading-none" aria-hidden>+ <span className="text-danger text-sm leading-none" aria-hidden>*</span>)}@@ -132,7 +132,7 @@ export const SettingsInput = forwardRef<HTMLInputElement, SettingsInputProps>(className={cn(formControlSettingsFieldClassName,"disabled:bg-surface-raised disabled:border-border-subtle",- error && "border-red-500",+ error && "border-danger",inputClassName,)}/>@@ -141,7 +141,7 @@ export const SettingsInput = forwardRef<HTMLInputElement, SettingsInputProps>(id={errorId}role="alert"data-testid={testId ? `${testId}-error` : undefined}- className="text-xs text-red-400 -mt-1"+ className="text-xs text-danger -mt-1">{error}</p>