Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added data attribute to FormLabel when field is invalid #5188

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

frannoriega
Copy link

Currently, we were setting the class text-destructive to the Label element, when the form field had invalid values.
That was problematic, since it didn't allow the user to customize the style of the Label component.

To solve this, I've added a data attribute, data-invalid, when the form field is invalid.
The users can then use that to customize the style.

Currently, we were setting the class `text-destructive` to the `Label`
element, when the form field had invalid values.
That was problematic, since it didn't allow the user to customize the
style of the `Label` component.

To solve this, I've added a data attribute, `data-invalid`, when the
form field is invalid.
The users can then use that to customize the style.
Copy link

vercel bot commented Oct 2, 2024

@frannoriega is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants