react-native-ui-lib icon indicating copy to clipboard operation
react-native-ui-lib copied to clipboard

Card component doesn't apply backgroundColor property when both onPress and activeScale are provided

Open LazyAfternoons opened this issue 3 years ago • 0 comments

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

  1. Create a Card component;
  2. Set backgroundColor inline style;
  3. Set onPress prop;
  4. 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

LazyAfternoons avatar Sep 01 '22 08:09 LazyAfternoons