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

styled method aspectRatio property type invalid #132

Closed
demic-dev opened this issue Oct 15, 2021 · 4 comments
Closed

styled method aspectRatio property type invalid #132

demic-dev opened this issue Oct 15, 2021 · 4 comments

Comments

@demic-dev
Copy link

Hi!

When you declare a component with the styled method and you give them styling, aspectRatio property is set as string, but React Native requires a number.

Screenshot 2021-10-15 at 22 55 28

Workaround

Commenting the line before with @ts-ignore can avoid the problem. Example:

const Image = styled(Image)({
  width: 300px,
  // @ts-ignore
  aspectRatio: 1
});
@nandorojo
Copy link
Owner

Could you try upgrading to v3

yarn add dripsy@canary

it comes with a ton of types improvements, maybe this one is fixed too…

@nandorojo
Copy link
Owner

See more at #124

@demic-dev
Copy link
Author

Yes, with the latest version is working fine, thanks for the quick response!

@nandorojo
Copy link
Owner

Cool

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

No branches or pull requests

2 participants