Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Car 9534: new component "radioButtonGroupWithTitle" #573

Merged
merged 7 commits into from
Jan 31, 2022
Merged

Conversation

Marine-Berthier
Copy link
Contributor

@Marine-Berthier Marine-Berthier commented Jan 25, 2022

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

@autoricardo-bot autoricardo-bot deployed to branch-carforyou-components-pkg-car-9534 January 25, 2022 13:19 Active
@autoricardo-bot autoricardo-bot deployed to branch-carforyou-components-pkg-car-9534 January 25, 2022 13:29 Active
@autoricardo-bot autoricardo-bot deployed to branch-carforyou-components-pkg-car-9534 January 25, 2022 13:41 Active
Copy link
Contributor

@talamcol talamcol left a 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}
Copy link
Contributor

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?

Copy link
Contributor Author

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}
Copy link
Contributor

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 }
Copy link
Contributor

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?

Copy link
Contributor Author

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({
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed that ! 😃

@Marine-Berthier Marine-Berthier changed the title Car 9534 Car 9534: new component "radioButtonGroupWithTitle" Jan 26, 2022
@autoricardo-bot autoricardo-bot deployed to branch-carforyou-components-pkg-car-9534 January 26, 2022 10:12 Active
@Marine-Berthier
Copy link
Contributor Author

Thank you for the review @talamcol ! I added an error props. We don't need it currently but we might in the future

@Marine-Berthier Marine-Berthier marked this pull request as ready for review January 26, 2022 10:26
@Marine-Berthier Marine-Berthier requested review from a team, Averethel, lkappeler and GutierrezGo and removed request for a team January 26, 2022 10:26
@autoricardo-bot autoricardo-bot temporarily deployed to branch-carforyou-components-pkg-car-9534 January 31, 2022 08:02 Destroyed
@Marine-Berthier Marine-Berthier merged commit 234b9a4 into master Jan 31, 2022
@Marine-Berthier Marine-Berthier deleted the car-9534 branch January 31, 2022 13:30
@autoricardo-bot
Copy link
Collaborator

🎉 This PR is included in version 22.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

3 participants