Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS: update d.ts for prop style accept array #1520

Closed
ArmandoAssuncao opened this issue Jan 17, 2018 · 1 comment
Closed

TS: update d.ts for prop style accept array #1520

ArmandoAssuncao opened this issue Jan 17, 2018 · 1 comment
Labels

Comments

@ArmandoAssuncao
Copy link
Contributor

Hi,

I'm using this code to set two styles in prop of component:

<Button
       style={[styles.one, styles.two]}
>
  foo                
 </ButtonNative>

But ts show this warning:
Type 'ViewStyle[]' has no properties in common with type 'ViewStyle'

What do you think about defining the prop style in .d.ts, like:

interface Button ... {
  style?: ReactNative.ViewStyle | ReactNative.ViewStyle[];
}

native-base: 2.3.6

SupriyaKalghatgi added a commit that referenced this issue Feb 2, 2018
Fix for issue #1520 (TS: update d.ts for prop style accept array )
@SupriyaKalghatgi
Copy link
Contributor

Fixed with 2.3.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants