RectButton's border radius inheriting border radius of other RectButton
See original GitHub issueI’m using:
React Navigation v5
Gesture Hander v1.6.0
Styled Components v5
I have a home page with many RectButons inside a FlatList with border-radius: 10px
and another page which I can navigate in, with a ScrollView with RectButtons without any border-radius property configured (already tried to set border-radius: 0;
but not works)
But the second one “inherits” the border-radius value
First RectButton
import styled from 'styled-components/native';
import { RectButton } from 'react-native-gesture-handler';
export const Page = styled(RectButton)`
width: 270px;
padding: 20px;
margin-right: ${props => (props.last ? '0px' : '20px')};
border-radius: 10px;
background: ${colors.white};
`;
Second (other page)
import styled from 'styled-components/native';
import { RectButton } from 'react-native-gesture-handler';
export const Item = styled(RectButton)`
padding: 10px 0;
`;
When inspecting those elements, both has the correct style properties, but border-radius
stills there
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
border-radius - CSS: Cascading Style Sheets - MDN Web Docs
The border-radius CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, ......
Read more >border-radius - CSS-Tricks
]? The border-radius property takes between one and four length or percentage values, where one value sets the radius for all four corners...
Read more >React Native Border Radius with background color
In React Native, borderRadius is working but the background color given to the button stays a square. What is going on here?
Read more >It's not possible to set border radius of single corner of ...
Description. I want to set border radius just of top left and bottom right corners of RectButton . To do this, I use...
Read more >Borders · Bootstrap v5.2
Use border utilities to quickly style the border and border-radius of an element. Great for images, buttons, or any other element.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any fix? Same behavior here.
Found solution, add
background-color: any color
andborder-radius: -1px