breeffy / react-native-monorepo

Monorepo with UI components.
Apache License 2.0
183 stars 8 forks source link

Exception when using with styled-components css prop #127

Closed likern closed 2 years ago

likern commented 2 years ago

When using styled-components css property, testID property is passed down to <Icon /> component, which leads to exception.

import 'styled-components/macro';
...
<Icon
 css={`
   margin-left: 14px;
 `}
  color={`${
    iconColor !== undefined ? iconColor : 'rgba(38, 47, 86, 1)'
  }`}
  icon={['far', iconName]}
  size={24}
/>
github-actions[bot] commented 2 years ago

Branch issue-127 created. Open it in the web editor.

likern commented 2 years ago

Because of https://github.com/breeffy/react-native-monorepo/issues/129 issue, don't pass testID down, just skip when it's passed and don't throw exception.