add data-error attribute for label element in inputs #6872
Closed
daniel-aziz
started this conversation in
Feature requests
Replies: 2 comments
-
You can do that with CSS using :has selector – https://codesandbox.io/p/sandbox/mantine-react-template-forked-xksdg6?file=%2Fsrc%2FApp.tsx%3A6%2C11&workspaceId=dd881b63-29f6-464c-bcdf-b5f78ad65b26 .mantine-InputWrapper-root:has(.mantine-Input-input[data-error]) .mantine-InputWrapper-label {
background-color: red;
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you! was able to achieve this for tailwind under root className.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
so label can be applied styles as wrapper or input.
Beta Was this translation helpful? Give feedback.
All reactions