Skip to content
New issue

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

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

Already on GitHub? # to your account

Types are not working correctly #534

Closed
juancjara opened this issue Sep 7, 2019 · 2 comments
Closed

Types are not working correctly #534

juancjara opened this issue Sep 7, 2019 · 2 comments

Comments

@juancjara
Copy link

juancjara commented Sep 7, 2019

I'm using typescript on my app, I added a basic <Box> with padding prop p={3} but got this error:

Type '{ children: Element; p: number; }' is not assignable to type 'IntrinsicAttributes & BoxProps & { children?: ReactNode; }'.
  Property 'p' does not exist on type 'IntrinsicAttributes & BoxProps & { children?: ReactNode; }'.ts(2322)

Reproduce link

https://codesandbox.io/s/festive-shockley-knjb6

@dmarcey
Copy link
Contributor

dmarcey commented Sep 9, 2019

I think that the issue here is this line from index.d.ts:

interface CommonProps extends BaseProps, StyledSystemProps.color, StyledSystemProps.space {}

should instead be

interface CommonProps extends BaseProps, StyledSystem.ColorProps, StyledSystem.SpaceProps {}

I can verify and get out a PR.

@emplums
Copy link

emplums commented Sep 13, 2019

Fixed in 13.5.0!

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

No branches or pull requests

3 participants