| name | new-component |
| description | Scaffold a new React component following project conventions |
| argument-hint | [ComponentName] |
Create a new React component named $ARGUMENTS following this project's conventions.
Project Conventions
-
File header: Every file starts with:
/************************
* Author: [MR FERRY™] *
* <Month Year> *
************************/
Use the current month and year.
-
TypeScript: All components use .tsx extension with typed props.
-
Props interfaces: Define props interfaces in src/types/DataTypes.ts if they will be shared, or inline if
component-specific.
-
Imports: Use named imports. Import React explicitly.
-
Component style: Use function components (arrow functions), not class components. Export as default.
-
Styling: Use plain CSS with class names (Bootstrap 5 available). Place CSS in src/components/ alongside the
component.
-
Gatsby features: Use <Slice> for reusable layout parts, useStaticQuery + graphql for component-level data,
gatsby-plugin-image for responsive images.
Steps
- Create the component file in
src/components/$ARGUMENTS.tsx
- Add TypeScript interface to
src/types/DataTypes.ts if props are shared
- Add CSS file if needed
- Run
git add on all new files
- Run
bun run typecheck to verify