ChoiceGroupOption className prop overwrites default styles
When using the className prop of a ChoiceGroupOption, not only does it overwrite the default classes that should be on there, it gets applied to the hidden radio button element, which is not useful.
https://codepen.io/anon/pen/QJyQJZ
Code:
<ChoiceGroup
label={ "Example" }
options={ [
{
key: "foo",
text: "foo",
imageSrc: "http://placekitten.com/64/64",
className: 'test0'
},
{
key: "bar",
text: "bar",
imageSrc: "http://placekitten.com/64/64",
className: 'test2'
}
] } />
The result will show the radio button which should be invisible. This is because of this line of code: https://github.com/OfficeDev/office-ui-fabric-react/blob/master/packages/office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroupOption/ChoiceGroupOption.base.tsx#L61
The className from props overwrites the already-defined className. className should instead be mixed into the root div for maximum flexibility in customization.
(low priority, non-blocking)
:tada:This issue was addressed in #7031, which has now been successfully released as [email protected].:tada:
Handy Links: