Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use border radius only for 1 corner (react-native)?

How to use border radius in React Native only for 1 corner?

I have a modal window

http://f1.s.qip.ru/etSMz5YP.png

As you can see bottom corners not rounded, it happens when I used backgroundColor for buttons. I was trying to set overflow hidden to modal wrapper and it didn't help me. Now I want to use border radius to buttons (only for 1 corner).

My code http://jsbin.com/sexeputuqe/edit?html,css

like image 303
Maksim Avatar asked Feb 11 '16 14:02

Maksim


People also ask

How do you make rounded corners in react?

The rounded corner can be achieved by using the cssClass property. Add a custom class to the menu component and customize it using the border-radius CSS property.

How do you give border radius to an image in React Native?

To add a rounded image with a border with React Native, we can set the borderRadius and overflow styles. to set borderRadius to '50%' to make the Image round. And we set the width and height of the Image to set the dimensions. We set overflow to 'hidden' so the Image stays in the circle.


Video Answer


1 Answers

Did you already try with the following?
- borderBottomLeftRadius: number
- borderBottomRightRadius: number
- borderTopLeftRadius: number
- borderTopRightRadius: number

Also, you can find more info in the view component docs.

like image 114
Matteo Mazzarolo Avatar answered Oct 15 '22 22:10

Matteo Mazzarolo