react-native-ui-lib
react-native-ui-lib copied to clipboard
Card component doesn't apply backgroundColor property when both onPress and activeScale are provided
Description
When using the Card component, sending a style with backgroundColor property won't work when both onPress and activeScale props are provided. It is properly applied if onPress or activeScale are not applied at once.
Related to
- [x] Components
- [ ] Demo
- [ ] Docs
- [ ] Typings
Steps to reproduce
- Create a Card component;
- Set backgroundColor inline style;
- Set onPress prop;
- Set activeScale prop;
Expected behavior
The background color should be applied even with both props.
Actual behavior
It is only applied if one of the props, onPress or activeScale, is missing.
More Info
Code snippet
<Card style={{marginBottom: 10}} onPress={() => console.log('pressed'} activeScale={0.96}>
<Card.Section
content={[
{text: 'You’re Invited!', text70: true, $textDefault: true},
{text: 'join now', text90: true, $textDefault: true}
]}
style={{padding: 20}}
/>
</Card>
Screenshots/Video
Environment
- React Native version: 0.69
- React Native UI Lib version: 6.20.1
Affected platforms
- [x] Android
- [x] iOS
- [ ] Web