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(RadioGroup): configurable label size #881

Merged
merged 8 commits into from
Oct 27, 2023

Conversation

connerblanton
Copy link
Contributor

πŸ”— Linked issue

#779

❓ 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

Allowing the label, required, and help text size on a Radio component to be configured. This also includes a fix where the RadioGroup component was allowed to be configured in the app.config.ts file using the select key. Documentation updated to include callout about using the new uiRadio prop to configure the Radio options when using the RadioGroup component.

Resolves #779

πŸ“ Checklist

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

@vercel
Copy link

vercel bot commented Oct 27, 2023

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

Name Status Preview Updated (UTC)
ui βœ… Ready (Inspect) Visit Preview Oct 27, 2023 8:55pm

}
},
emits: ['update:modelValue', 'change'],
setup (props, { emit }) {
const { ui, attrs } = useUI('radioGroup', toRef(props, 'ui'), config, toRef(props, 'class'))
const { ui: radioUI } = useUI('radio', toRef(props, 'uiRadio'), configRadio)
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather call it uiRadio to keep consistency with SelectMenu and others: https://github.com/nuxt/ui/blob/dev/src/runtime/components/forms/SelectMenu.vue#L319

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure why I didn't change that to match the prop πŸ˜…

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.

@connerblanton
Copy link
Contributor Author

I thought that too, but removing it caused other alignment issues

With the text-sm
Screenshot 2023-10-27 at 2 57 47 PM

Without the text-sm
Screenshot 2023-10-27 at 2 58 05 PM

I can spend more time figuring out why that is the happening if you want

@connerblanton
Copy link
Contributor Author

Well never mind I figured it out. Needing to add an inline-flex items-center and that fixes the alignment. Going to do some more tests with that change in place and then I'll push the commit

@benjamincanac
Copy link
Member

Let me know when you're done 😊

@connerblanton
Copy link
Contributor Author

All done. Ready to merge in!

@benjamincanac benjamincanac merged commit 5a2644b into nuxt:dev Oct 27, 2023
2 checks passed
@benjamincanac
Copy link
Member

Thanks 😊

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.

Radio: make label size configurable
2 participants