vonovak / react-native-round-checkbox

iOS-styled round checkbox for RN
30 stars 13 forks source link

Check mark icon not aligned in center #10

Open piyush0506 opened 4 years ago

piyush0506 commented 4 years ago

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?

naheed-shamim commented 4 years ago

Just go to the implementation file and update this

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

piyush0506 commented 3 years ago

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

lorenjohnson commented 3 years ago

+1

Vickout commented 2 years ago

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.

diatche commented 2 years ago

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

MiracleUFO commented 2 years ago

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