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

Input component #18

Merged
merged 3 commits into from
Feb 7, 2024
Merged

Input component #18

merged 3 commits into from
Feb 7, 2024

Conversation

DanWebb
Copy link
Member

@DanWebb DanWebb commented Feb 7, 2024

Wraps around the native <input> to provide styles and states.

This is kept pretty barebones at the moment

  • Uses ninja input pattern to hide the input and apply states to the outer border instead
  • Focus handled via focus within
  • Disabled handled using :has selector
  • Default colors use theme vars to be unopinionated
  • State prop for valid/invalid, I considered using :has(:valid) but I think we still rarely use HTML validation(?)
  • Affix is covered without any props but it does assume only 3 elements are inside the diamond-input
  • Handling SVG under button and icon is the same, not sure about this yet, I think it's okay until we get into more depth with the icon component
Screen.Cast.2024-02-07.at.3.59.39.PM.mp4

@DanWebb DanWebb requested a review from gavmck February 7, 2024 16:05
@DanWebb DanWebb self-assigned this Feb 7, 2024
@DanWebb DanWebb merged commit 1f181ef into main Feb 7, 2024
6 checks passed
@JoshTheWanderer JoshTheWanderer deleted the feature/etch-384-input branch February 8, 2024 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants