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

Create a generic ChipGroup component #248

Open
damonbauer opened this issue Feb 21, 2021 · 2 comments
Open

Create a generic ChipGroup component #248

damonbauer opened this issue Feb 21, 2021 · 2 comments

Comments

@damonbauer
Copy link
Contributor

damonbauer commented Feb 21, 2021

I'd like to render a group of <Chip> instances.

My current options:

  • resort to using a <CheckboxChip> or a <RadioChip>
  • wrap my group of <Chip> instances in a container, and I have handle the group styles & chip spacing.

I'd love have a <ChipGroup {items} /> just like there's a <RadioChipGroup {items} name="group1" />.

@illright
Copy link
Owner

Yeah, maybe this could be useful after all. What styles would you like to see in this component? And what Sass variables maybe?

I'm seeing something like:

display: flex;
flex-wrap: wrap;

:global .chip:not(:first-child) {
  margin-left: .3em;  // or maybe have that be a variable
}

@damonbauer
Copy link
Contributor Author

@illright - Yeah, that's exactly what I was thinking. It would be ideal to have a $chip-group-chip-spacing variable as you've described.

Perhaps the only other customizable piece might be the ability to align the ChipGroup...although that might not be necessary:

display: flex;
flex-wrap: wrap;
justify-content: $chip-group-alignment; // default 'flex-start'

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

No branches or pull requests

2 participants