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

Checkbox Component #44

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Conversation

21shield
Copy link
Collaborator

@21shield 21shield commented Jan 9, 2025

Changes

  • Creates a checkbox component

DOD

  • Checkbox is accessible
  • Checkbox has unit tests
  • Checkbox is accessible in Storybook

Preview

Screenshot 2025-01-10 at 10 50 33 PM To QA: http://localhost:6006/?path=/story/Checkbox

package.json Outdated Show resolved Hide resolved
src/components/Checkbox/Checkbox.tsx Outdated Show resolved Hide resolved
src/components/Checkbox/Checkbox.tsx Outdated Show resolved Hide resolved
src/components/Checkbox/Checkbox.tsx Outdated Show resolved Hide resolved
src/components/Label/Label.tsx Outdated Show resolved Hide resolved
@21shield 21shield marked this pull request as ready for review January 11, 2025 03:50
@21shield 21shield added the minor features upgrade or addition label Jan 11, 2025
Comment on lines +6 to +11
${({
theme: {
semantic: {
color: { content },
},
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is an example for deconstructing from the theme might look like

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Created and imported an svg to be used when a user clicks on the box < should this stay here?>

Comment on lines +18 to +19
borderColor: theme.semantic.color.border.default,
borderRadius: theme.semantic.border.radius.small,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This may be a little harder to deconstruct since the similarities end at semantic, in my opinion but open to it

Comment on lines +30 to +34
'&:after': {
content: "''",
background: 'white',
'-webkit-mask': `url(${checkmark})`,
maskRepeat: 'no-repeat',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

created a psuedo element to help showcase the checkmark

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

Successfully merging this pull request may close these issues.

3 participants