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

[Feature Request] Refactor to styled component #96

Open
RuudBurger opened this issue Jan 21, 2021 · 2 comments
Open

[Feature Request] Refactor to styled component #96

RuudBurger opened this issue Jan 21, 2021 · 2 comments

Comments

@RuudBurger
Copy link

When developing new components I usually start of writing css inline using the normal style object, like so:
<div style={{backgroundColor: 'red', border: '1px solid blue' }} />

It would be nice if this plugin could hook into the refactor context menu and add an "extract Styled Component" option. Just like we already have a "Extract Component..." option:
Screen Shot 2021-01-21 at 14 42 56

Then from the aboven example create something like:

const MyComponent = styled.div`
   background-color: red;
   border: 1px solid blue;
`
@patrickmccallum
Copy link

👍 This is one thing I miss a lot from a similar VS Code extension.

@danaimone
Copy link

👍 as well. Would love to see this enter the Webstorm workflow since I commonly find myself wanting to auto generate a snippet from the development. Anyone able to tackle this?

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

3 participants