Prompt file imported from eliasredit-ch/prototype_networkswissparks (
.github/prompts/create-react-component.prompt.md). Copyright stays with the author.
Create a new React component in TypeScript.
Before generating code, ask for:
- component name
- props and types
- acceptance criteria
Requirements:
- use a small, readable function component
- include accessible, semantic markup
- keep styling assumptions minimal
- add minimal behavior-focused tests using Vitest and React Testing Library
- avoid unnecessary abstractions, mock complexity, and large files
Return:
- proposed file paths
- component code
- test code
- brief notes on assumptions or open questions