kiran
kiran

Reputation: 1246

border on cells of a grid is not uniform in react native

I am trying to build a simple calculator with react native.

I created a button component with borderWidth 0.5 and used this button component to form keypad. But border is not uniform. Border appears thick on few cells compared to others enter image description here

Code for this is at https://github.com/akiran/exponent-calculator/blob/master/components/Buttons.js

https://github.com/akiran/exponent-calculator/blob/master/components/KeyPad.js

Upvotes: 2

Views: 1236

Answers (1)

NiFi
NiFi

Reputation: 2458

I used your code to build an example, could not quite figure out why that is happening. It is however a reproducible issue. Possibly has to do with overlapping borders?

As a workaround, you can use borderLeftWidth: 1 and borderTopWidth: 1 and leave the other borders at 0 width, which produces the result visible below.

Uniform borders example

Upvotes: 1

Related Questions