wix / react-native-ui-lib

UI Components Library for React Native
https://wix.github.io/react-native-ui-lib/
MIT License
6.45k stars 706 forks source link

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

Closed LazyAfternoons closed 1 year ago

LazyAfternoons commented 2 years ago

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

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

Affected platforms

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

LazyAfternoons commented 1 year ago

Still an issue.