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
Segment Control #5170
Segment Control #5170
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great
Oh that's interesting. I just stumbled on this issue, and I'm building a very similar toggle for the new am/pm toggle: However, in my case semantically it shouldn't be a radio button but actual buttons, so I opted for the toggle group. Although in other place in the design a radio button definitely is the right choice. So I think that in the future we should see if we could somehow share the styles, but give the dev the option to use it either as a radio button or as a native button toggle. What do you think? My WIP commit: |
Although I agree with what you are saying - I believe the functionality of both is different. One is a form input and the other isn't ? that just doesn't sit right with me in some ways |
Yes agree. It is visually similar, but the implementation is different indeed. Not sure if we can merge it somehow, at least styling wise. But it should still be able to be a button or a radio. For now lets keep it in the back of our minds and see if we need to merge it one day. I did for example add an animation when switching the toggle, would be nice if those things stayed consistent. |
@sean-brydon looks perfect (@JeroenReumkens I had actually set Seán this task after designing that am/pm task thinking it could be reused so good to know 2 types are needed) |
* Segment * Fix type errors * Fix HUG
* Segment * Fix type errors * Fix HUG
* Segment * Fix type errors * Fix HUG
What does this PR do?
Fixes: #5151
Added example to
sandbox
I know this isn't really used but radix tailwind doesn't like storybook as it doesn't generate the styles.@Jaibles Visit localhost:3000/sandbox/form or use the preview URL https://cal-git-segmentcontroll-cal.vercel.app/sandbox/form for the same thing :)