From becce834ef9e7022bf7464160876a4fd7b2fed9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Dostie?= <35579930+gdostie@users.noreply.github.com> Date: Mon, 21 Oct 2024 12:01:12 -0400 Subject: [PATCH] fix(mantine): select asterisk color is too light (#3932) --- .../mantine/src/components/read-only/ReadOnlyInputStyles.ts | 3 +++ packages/mantine/src/theme/Theme.tsx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/mantine/src/components/read-only/ReadOnlyInputStyles.ts b/packages/mantine/src/components/read-only/ReadOnlyInputStyles.ts index c8636a5e25..7354f5ea0d 100644 --- a/packages/mantine/src/components/read-only/ReadOnlyInputStyles.ts +++ b/packages/mantine/src/components/read-only/ReadOnlyInputStyles.ts @@ -7,6 +7,9 @@ export const readOnlyInputStyles = (theme: MantineTheme) => ({ '--input-color': theme.colors.gray[7], '--input-placeholder-color': theme.colors.gray[7], }, + label: { + '--input-asterisk-color': theme.colors.red[2], + }, input: { cursor: 'text', }, diff --git a/packages/mantine/src/theme/Theme.tsx b/packages/mantine/src/theme/Theme.tsx index 913bd3dada..23d388c44a 100644 --- a/packages/mantine/src/theme/Theme.tsx +++ b/packages/mantine/src/theme/Theme.tsx @@ -206,7 +206,7 @@ export const plasmaTheme: MantineThemeOverride = createTheme({ classNames: InputWrapperClasses, vars: (theme, props) => { const anyProps = props as any; - if (anyProps.readOnly || anyProps.disabled) { + if (anyProps.disabled || (anyProps.readOnly && !['Select'].includes(anyProps.__staticSelector))) { return { label: {'--input-asterisk-color': theme.colors.red[2]}, error: {},