Skip to content

[Feature Request] Refactor to styled component #96

Open
@RuudBurger

Description

@RuudBurger

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;
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions