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!: handle color states on form elements #234

Merged
merged 12 commits into from May 26, 2023

Conversation

benjamincanac
Copy link
Member

@benjamincanac benjamincanac commented May 26, 2023

Resolves #229, resolves #202

This pull request introduces some breaking changes to provide color states to Input, Textarea, Select and SelectMenu components:

InputGroup

  • Component has been renamed to FormGroup and now has its own documentation page
  • error prop has been added with its own preset ui.formGroup.error
  • Component now uses a render function to dynamically set the color prop of children to red
  • label, labelWrapper and required preset classes have been moved in label object

Input / Textarea / Select / SelectMenu

  • rounded preset class has been moved from variants to the root of the preset to be customizable globally
  • placeholder preset class has been moved from variants to the root of the preset to be customizable globally
  • appearance prop has been removed in favor of color (defaults to white) and variant (defaults to outline) to follow Badge and Button convention, this will also allow us to define other variants in the future
  • padded prop has been added to remove padding easily

@vercel
Copy link

vercel bot commented May 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ui ✅ Ready (Inspect) Visit Preview May 26, 2023 5:31pm

@benjamincanac benjamincanac merged commit 9ce531a into dev May 26, 2023
2 checks passed
@benjamincanac benjamincanac deleted the form-elements-color-states branch May 26, 2023 20:07
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.

Error State for Input, Textarea, Select, SelectMenu [InputGroup] Automatic id binding if none provided
1 participant