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

Abstract getStyleRule #216

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

joebourne
Copy link

@joebourne joebourne commented Nov 30, 2018

This PR attempts to fix #117.

@MicheleBertoli I was not sure how you would want this utility to be exported. To stop it being run when calling import 'jest-styled-components' we could export it from its own file i.e. import getStyleRule from 'jest-styled-components/getStyleRule', but it's less intuitive for users.

Let me know what you think. Thanks.

@MicheleBertoli
Copy link
Member

Thank you very much for working on this, @joebourne.
This looks good to me.

What about import {getStyleRule} from 'jest-styled-components/utils'?

@joebourne
Copy link
Author

No problem, and thanks for reviewing @MicheleBertoli.

I've fixed up the import now.

@MicheleBertoli
Copy link
Member

Hey @joebourne, thank you very much for your update.
I believe you need to create a "utils" folder which points to the function (see "native").
Otherwise this would be accessible via jest-styled-components/src/utils, right?

@joebourne
Copy link
Author

Ah yes sorry @MicheleBertoli, the import is now coming from a new utils directory at the root level.

@joebourne
Copy link
Author

Hi @MicheleBertoli, can I get an update on this please? Is there anything else you want fixing up?

@quantizor
Copy link
Contributor

@joebourne if you wouldn't mind getting this fixed up against the new 7.x beta code I'd be interested to include the new functionality in 7.0 final :)

@joebourne
Copy link
Author

@probablyup great! I've just fixed it up if you could take another look. Thanks.

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

Successfully merging this pull request may close these issues.

Snapshot of style rule(s)
4 participants