react-radio-buttons icon indicating copy to clipboard operation
react-radio-buttons copied to clipboard

Button outer circle is drawn incorrectly

Open Shirikatsu opened this issue 7 years ago • 9 comments

The outer circle of the button that indicates selection is drawn with the same radius as the inner circle rendering something that looks like this: screen shot 2017-06-29 at 12 27 36

Due to its smaller size but apparent same origin of drawing, the outer circle has displaced itself up and to the left, causing misalignment as well.

This happens with the example code also. I am not sure if there is a conflict in modules so here is my React project dependencies: screen shot 2017-06-29 at 12 32 09

Shirikatsu avatar Jun 29 '17 11:06 Shirikatsu

I have the same :)

SH-Stark avatar Jul 12 '17 14:07 SH-Stark

Same thing, and it's definitely caused by [email protected].

zivester avatar Jul 16 '17 23:07 zivester

Same issue, and I don't have bootstrap installed.

wesleycole avatar Jul 29 '17 19:07 wesleycole

use in css "box-sizing: content-box" on parent div

agustinramos avatar Aug 28 '17 15:08 agustinramos

You need to include iconSize as an attribute of your RadioButton. I set mine to 20.

    <RadioButton value={value} key={index} iconSize={20} >
        {display}
    </RadioButton>

hsimah avatar Sep 14 '17 12:09 hsimah

Neither of these solutions worked for me, but I just wrapped the RadioGroup in a div with class "radio" and used this css to hide the circles until better fixes roll in or I'm cured of laziness and make my own:

.radio > div > div > div > div > div:nth-child(2) { display: none; }

nathanielmoon avatar Nov 11 '17 20:11 nathanielmoon

Adding the iconSize={20} solved the issue for me.

MaxiSantos avatar Dec 06 '17 17:12 MaxiSantos

I was able to get the RadioIcon looking decent using the following:

<ReversedRadioButton pointColor={ '#0c58ca' } iconSize={ 50 } iconInnerSize={ 40 } value="five"> <span style={{ fontSize: '22px', color: 'black'}}>Five </ReversedRadioButton>

Note: In my case I needed to make the circles much larger for an easier click experience.

chrislangston avatar Apr 11 '18 02:04 chrislangston

following on from the fix by @nightCapLounge I figured out that the problem was the box-sizing method used by bootstrap and probably a lot of other frameworks. Overriding that for just the outer div of the rings fixed it for me.

.radio > div > div > div > div:nth-child(2)
{
  box-sizing: content-box;
}

DavidHayesCoding avatar Dec 18 '18 16:12 DavidHayesCoding