-
Notifications
You must be signed in to change notification settings - Fork 0
Car 9534: new component "radioButtonGroupWithTitle" #573
Conversation
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.
very nice!
I'd consider adding an error text possibility. I think we need it for leasing, no?
value={radioInput.value} | ||
checked={radioInput.checked} | ||
renderLabel={radioInput.renderLabel} | ||
disabled={disabled} |
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.
is there a reason why it's not part of the radioInput object?
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.
Yes, it's because I think we should be able to set it up globally to disable every RadioButtons
at once
{radioInputs.map((radioInput, index) => ( | ||
<RadioButton | ||
key={index} | ||
name={radioInput.name} |
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.
you could also just do {...radioInput}
and remove all the props here :)
} | ||
|
||
export default RadioButtonGroup | ||
export { Props as RadioButtonGroupProps } |
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.
do you need this export somewhere?
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.
Yes, we need it for the stories
radioInputs: RadioButtonProps[] | ||
} | ||
|
||
function RadioButtonGroup({ |
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.
it's totally fine like this but aren't we usually using the arrow function syntax? :D
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 changed that ! 😃
Thank you for the review @talamcol ! I added an error props. We don't need it currently but we might in the future |
🎉 This PR is included in version 22.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
References CAR-9534
Related PR : https://github.com/carforyou/carforyou-listings-web/pull/4030
Currently we dont have a component that returns a group of
RadioButton
with a global title. It could be useful in some cases, for example, to solve the issue of the related PR linked above.In case this PR is approved, I'll create a task to replace the current occurences