Commit 772b54a2 authored by tom's avatar tom

better required indicator

parent 8fadb565
...@@ -33,6 +33,9 @@ const variantFloating: PartsStyleFunction<typeof parts> = (props: StyleFunctionP ...@@ -33,6 +33,9 @@ const variantFloating: PartsStyleFunction<typeof parts> = (props: StyleFunctionP
input: { input: {
...activeInputStyles, ...activeInputStyles,
}, },
'label .chakra-form__required-indicator': {
color: getColor(theme, fc),
},
}, },
// label's styles // label's styles
label: { label: {
...@@ -64,10 +67,17 @@ const variantFloating: PartsStyleFunction<typeof parts> = (props: StyleFunctionP ...@@ -64,10 +67,17 @@ const variantFloating: PartsStyleFunction<typeof parts> = (props: StyleFunctionP
'input[aria-invalid=true]': { 'input[aria-invalid=true]': {
borderColor: getColor(theme, ec), borderColor: getColor(theme, ec),
}, },
// indicator's styles
'input:not(:placeholder-shown) + label .chakra-form__required-indicator': {
color: getColor(theme, fc),
},
'input[aria-invalid=true] + label .chakra-form__required-indicator': {
color: getColor(theme, ec),
},
}, },
requiredIndicator: { requiredIndicator: {
marginStart: 0, marginStart: 0,
color: fc, color: mode('gray.500', 'whiteAlpha.400')(props),
}, },
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment