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

fix(ButtonGroup): handle components with children #999

Merged
merged 9 commits into from
Nov 20, 2023

Conversation

connerblanton
Copy link
Contributor

πŸ”— Linked issue

#256

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Trying another shot at this one πŸ˜€ Using provide/inject through the new useButtonGroup composable. Using Vue's getCurrentInstance so that a child can figure out it's position in the ButtonGroup and adjust it's roundness accordingly.

Added this functionality to the Badge, Button, Input, Select, and SelectMenu components

Resolves #256

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link

vercel bot commented Nov 19, 2023

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated (UTC)
ui βœ… Ready (Inspect) Visit Preview Nov 20, 2023 5:24pm

@connerblanton connerblanton changed the title Fix/button group fix(ButtonGroup): Handle components with children Nov 19, 2023
@benjamincanac benjamincanac changed the title fix(ButtonGroup): Handle components with children fix(ButtonGroup): handle components with children Nov 20, 2023
Copy link
Member

@benjamincanac benjamincanac left a comment

Choose a reason for hiding this comment

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

Any idea on the preview why the size and orientation props are not reactive? It does the same when using the component.
https://ui-6r8tp8i74-nuxt-js.vercel.app/dev/elements/button#group

Copy link
Member

@benjamincanac benjamincanac left a comment

Choose a reason for hiding this comment

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

Everything looks good to me 😊

Amazing work really, you saved me on this! Thanks a lot ❀️

@benjamincanac benjamincanac merged commit f4be95d into nuxt:dev Nov 20, 2023
2 checks passed
@connerblanton
Copy link
Contributor Author

No problem at all! Thanks for the advice on the other PR and pointing me in the direction of Anthony's solution. Really made me rethink the problem and I got to learn from it all 😊

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

Successfully merging this pull request may close these issues.

[ButtonGroup] Handle children like a dropdown with a button inside
2 participants