react-native-round-checkbox
react-native-round-checkbox copied to clipboard
Check mark icon not aligned in center
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:
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?
Just go to the implementation file and update this
const iconSize = parseInt(size * 1.1, 10); <------- UPDATE HERE, Change this to -> const iconSize = size;
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
+1
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.
Yan can use patch-package to make the changes in the implementation file permanent.
Why can't this be fixed permanently in the package?