-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Component purpose
Create a card component to display information about an upcoming quiz or competition, including the title, date, description and a registration call-to-action.
Requirements
- Accept props:
title
,date
,description
, andonRegister
callback. - Use MUI
Card
orPaper
as the base and style it usingstyled()
orsx
with design system tokens for spacing, typography and colors. - Highlight the date with an icon or badge; provide a default date format constant in
.constants.ts
. - Define prop types in
.types.ts
and consider extending MUI card props. - If internal state is needed, isolate it in a hook (e.g.,
useUpcomingQuizCard
). - Write unit tests with Jest/Testing Library that verify the date formatting and that the
onRegister
callback is triggered when the button is clicked, usingdata-testid
attributes. - Provide Storybook stories for different scenarios (with and without description) and allow interactive props via
args
. - Document the component in
.docs.mdx
explaining usage and props.
Desdign

File structure
UpcomingQuizCard/
├── UpcomingQuizCard.tsx
├── UpcomingQuizCard.types.ts
├── UpcomingQuizCard.constants.ts
├── UpcomingQuizCard.styles.ts
├── UpcomingQuizCard.hook.ts (optional)
├── UpcomingQuizCard.utils.ts (optional)
├── UpcomingQuizCard.test.tsx
├── UpcomingQuizCard.stories.tsx
└── UpcomingQuizCard.docs.mdx
Metadata
Metadata
Assignees
Labels
No labels