0.0.5 • Published 4 months ago
create-react-component-tk v0.0.5
Create React Component
1. Right click on a folder or a file
If you right-click on a file, you will have the option to create your component on the same level as that file. If you right-click on a folder, you will have the options to create your component on the same level as that folder, as well as in it.
2. Input options
You will be prompted for the following things:
- Component name (will be casted to pascal case)
- Whether to use TypeScript
- Whether to use SCSS
- Whether to use a CSS module
- Whether to name the component file after the component
- Whether to name the stylesheet
styles.<suffix>
or use the component name - Whether to include a barrel file (skipped if you decline step 5)
3. Folder and files will be created
The newly-created component file will contain some boilerplate to help you get started. If you reply yes to all the prompts, you will have a new folder with the following structure:
~
└── Sample
├── index.tsx
├── styles.module.scss
└── Sample.tsx
Happy coding :)