react-native-round-checkbox icon indicating copy to clipboard operation
react-native-round-checkbox copied to clipboard

Check mark icon not aligned in center

Open piyush0506 opened this issue 4 years ago • 6 comments

I'm using the example code something like this:

<RoundCheckbox
  size={24}
  checked={this.state.isSelected}
  onValueChange={(newValue) => {console.log(newValue)}}
/>

It looks something like this: Screenshot_20200812_184423

Icon is not aligned in center

Using following dependancies:

"react": "16.13.1",
"react-native": "0.63.1",
"rn-round-checkbox": "^1.0.0",
"react-native-vector-icons": "^7.0.0",

Anyone else having the solution?

piyush0506 avatar Aug 12 '20 13:08 piyush0506

Just go to the implementation file and update this

const iconSize = parseInt(size * 1.1, 10); <------- UPDATE HERE, Change this to -> const iconSize = size;

naheed-shamim avatar Oct 19 '20 13:10 naheed-shamim

Yes it works, but it's not permanent solution, once we run npm install / yarn install, our changes would be vanished. Looking for a permanent solution or any prop in it

piyush0506 avatar Dec 16 '20 11:12 piyush0506

+1

lorenjohnson avatar Dec 17 '20 13:12 lorenjohnson

Multiply the size by 1.1 does the icon greater than the checkbox itself. If it was smaller like 0.75 it would be more suitable.

Vickout avatar Feb 17 '22 17:02 Vickout

Yan can use patch-package to make the changes in the implementation file permanent.

diatche avatar Apr 28 '22 04:04 diatche

Why can't this be fixed permanently in the package?

MiracleUFO avatar Nov 08 '22 17:11 MiracleUFO