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

Skip undefined values for props #35

Closed
Kerumen opened this issue May 17, 2021 · 0 comments · Fixed by #41
Closed

Skip undefined values for props #35

Kerumen opened this issue May 17, 2021 · 0 comments · Fixed by #41
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Kerumen
Copy link
Contributor

Kerumen commented May 17, 2021

First of all, thanks for the fork! I enjoy using it instead of styled-system.

I have an issue when I want to display my component in Storybook because it sets all props of the component to undefined (I guess it's needed for the UI, to display the controls? I'm not sure).

Anyway, I want to render a Box (<Box paddingX={2} />) but Storybook sets paddingLeft, paddingRight, etc to undefined which overwrites the paddingX. Is it possible to ignore undefined values when parsing the props?

A fix was proposed to styled-system (PR here) but I don't have enough time to dig into your code and propose the same fix.

@roginfarrer roginfarrer added bug Something isn't working good first issue Good for newcomers labels May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants