react-radio-buttons
react-radio-buttons copied to clipboard
Add props which allow custom styling for button and "selected" button
This is a small PR to allow for custom styling to be added so css classes can overwrite the specific styles as needed. I am not sure this is the best solution, but the base case works for me. Happy to update anything upon request as well :-)
A developer could then add a buttonStyling
prop and a pointStyling
prop to the component which would overwrite any css as needed for both selected and unselected cases.
Added styling to adjust the css for the icon is not provided in this PR, I could potentially do it though in the future.
There seems to be a problem with my pointStyles, updating now...sorry!
OK updated, works for me now, sorry about that!
Hi. Thank you for your PR :)
However lib/index.js
is transpiled code - i.e. you should edit index.jsx in root folder.
I see, ok I will take a look when I have some time and ping you back when I can update the PR thanks :-)
Hey, how's this going?
Sorry about the delay, things have been crazy for me, I will try to update this asap and get an updated PR in.
Hi, I'm trying those properties, isn't working, no class are added in the html
<RadioGroup horizontal onChange={this.onChange}>
<RadioButton iconSize={20} buttonStyling="primarytoto" pointStyling="test2" value="optionOne">
{optionOneText}
</RadioButton>
<RadioButton buttonStyling="test" iconSize={20} value="optionTwo">
{ optionTwoText }
</RadioButton>
</RadioGroup>