React Blueprint Component
A reusable React component built with TypeScript and styled with CSS modules.
Installation
You can install the package globally using npm:
npm i -g react-blueprint-component
Usage
To create a new React component using this package, run the command react-cli create [component-name] and follow the prompts to specify the component type, directory, props, CSS style, and testing options
The CLI will prompt you for the following options:
- Type of component (Functional/Class)
- Directory to create the component in
- Props (if any) to add to the component
- CSS style (Material-UI/Styled Components/None)
- Whether to include a TypeScript file
- Whether to include a testing file
Once you've answered all the questions, the CLI will create the component in the specified directory with the specified options.
Project Structure
The project has the following file structure:
src
└── components
├── component-name.tsx
├── component-name.spec.tsx
├── component-name.style.ts
└── component-name.types.ts
-
component-name.tsx
- The main component file. -
component-name.spec.tsx
- The component test file. -
component-name.style.ts
- The component styles file. -
component-name.types.ts
- The component types file.
License
This project is licensed under the MIT license.