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(design-system): add Toggle component and stories #2648

Merged
merged 6 commits into from
Aug 25, 2021

Conversation

mantariksh
Copy link
Contributor

@mantariksh mantariksh commented Aug 20, 2021

Implements Toggle component.

Design considerations

Inclusion of icon in thumb

The original Chakra UI Switch implementation did not have the option to include an icon within the thumb (circular part of the Switch). Since we need to have icons in the thumb, I copied the implementation and adapted it to include the correct icon (checked/unchecked/disabled).

@mantariksh
Copy link
Contributor Author

need to fix a11y, label is not linked to toggle

@mantariksh mantariksh force-pushed the form-v2/toggle-component branch from 8efc07d to a9ab5ec Compare August 23, 2021 02:21
@mantariksh
Copy link
Contributor Author

need to fix a11y, label is not linked to toggle

done

@mantariksh mantariksh force-pushed the form-v2/toggle-component branch from a9ab5ec to 9fdffa1 Compare August 23, 2021 02:29
@mantariksh mantariksh requested a review from karrui August 23, 2021 02:36
Observation from design review was that the label and description
repeat themselves as a result of the VisuallyHidden component, so
it would be better to leave it out and rely on screen readers to
read out the label and description in sequence.
Copy link
Contributor

@karrui karrui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mantariksh mantariksh merged commit 0cb3ec9 into form-v2/develop Aug 25, 2021
@mantariksh mantariksh deleted the form-v2/toggle-component branch August 25, 2021 02:23
@justynoh justynoh mentioned this pull request Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants