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

are there types for propTypes package? #1908

Open
incompletude opened this issue Apr 3, 2021 · 1 comment
Open

are there types for propTypes package? #1908

incompletude opened this issue Apr 3, 2021 · 1 comment

Comments

@incompletude
Copy link

https://github.com/styled-system/styled-system/tree/master/packages/prop-types

I couldnt find it.

@sud0lancer
Copy link

I have the same issue. While Displaying the PropType table of a component in storybook, all the props from styled-system are shown as the type='other'.
Screenshot 2021-06-02 at 3 55 58 PM

All other custom props have their type shown properly.

I am importing the things as:

import { space, flex, flexBasis, layout, position } from 'styled-system';
import propTypes from '@styled-system/prop-types';

I am exporting the proptypes as:

BoxBase.propTypes = {
  ...propTypes.position,
  ...propTypes.layout,
  ...propTypes.flex,
  ...propTypes.flexBasis
};

Any help is appreciated.

Specs:
Node: v10.23.2
React: v16.8.6
Storybook: v6.1.21

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

No branches or pull requests

2 participants