-
Notifications
You must be signed in to change notification settings - Fork 0
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
Adds description to Option
#1258
Conversation
Important Review skippedAuto reviews are limited to specific labels. Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the step in the right direction.
It's probably worth noting that we have the OptionWithDescription
component available (seen below). Perhaps it would be worth either making a checkbox available as a prop in that component or the other idea was to do another custom component like OptionWithDescriptionAndCheckbox
(would prob be my preference) for our use case which basically is a combination of what Option
and OptionWithDescription
are.
Lmk if you have questions. Happy to help!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. I think just one more thing to consider is we probably want to be able to control for making the label
either bold or not. We'll probably want the label to be bold if a description is present just to have that visual hierarchy (and to match the Figma design we're going for), otherwise it can just be regular weight as is.
1400a01
to
b4a6c98
Compare
This PR allows you to use a description that's passed through the
data
prop so you get something that looks like this:Since the
Option
component and its accessible props seem dictated by React Select, it looked likedata
was the best place to access this. Let me know if that's wrong and if you think there's a better way to do this.