Skip to content

FallenMax/styled-components-extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Styled-Components Extractor

How to compose styled-components FASTER?

  1. (Recommended) Use Emmet to create JSX element tree
  2. Extract unbound components to clipboard, then paste it where approriate
  3. (Recommended) Use TypeScript to auto import those components

screenshot

Usage

Use VS Code Command: Extract styled-components (or Extract exported styled-components)

Optionally, You can bind these commands to shortcuts via File -> Preferences -> Keyboard Shortcuts.

Example:

[
  {
    "key": "cmd+alt+e",
    "command": "styledComponentsExtractor.extract",
    "when": "editorFocus"
  },
  {
    "key": "ctrl+alt+e",
    "command": "styledComponentsExtractor.extractExported",
    "when": "editorFocus"
  }
]

Configuration

{
  // Add `import styled from 'styled-component'` statement if variable `styled` is unbound
  "styledComponentsExtractor.addImportStatement": true
}

Release Notes

0.0.1

First release

About

VSCode extension that extracts unbound JSX tags into styled-components

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published