diff --git a/instructions/changelog.md b/instructions/changelog.md new file mode 100644 index 0000000..0dacf5a --- /dev/null +++ b/instructions/changelog.md @@ -0,0 +1,35 @@ +# Changelog + +## [0.1.0] - 2024-01-25 + +### Added +- Created new EventDetailsCover component + - Displays event title, date/time, and location + - Optional cover image with hide/show functionality + - Responsive design following Figma specs + - TypeScript interfaces for type safety + - Tailwind CSS for styling + +### New Files +- `/src/components/EventDetailsCover/` + - `EventDetailsCover.tsx` - Main component + - `types.ts` - TypeScript interfaces + - `index.ts` - Barrel exports +- `/src/utils/dateFormatter.ts` - Date formatting utility +- `/src/stories/EventDetailsCover.stories.tsx` - Storybook stories + +### Features +- Cover image with optional hide/show functionality +- Formatted date/time display +- Location details with venue, address, city, state +- Icon integration for calendar and location +- Storybook documentation with two variants: + - Default (with cover image) + - Without cover image + +### Technical Details +- Built with Next.js Image component for optimized images +- TypeScript for type safety +- Tailwind CSS for styling +- Storybook integration for component documentation +- Modular file structure following project conventions diff --git a/instructions/instructions.md b/instructions/instructions.md new file mode 100644 index 0000000..fe84c2e --- /dev/null +++ b/instructions/instructions.md @@ -0,0 +1,108 @@ +## Description: +Event details cover component will show the image, title, date and location of the event. + +Mock the data in the component. + +Ignore the right side of the desktop page, that is a separate component. For now add a div with the size of the right component to make it look like the design. + +Add a prop to the component called hideCoverImage: boolean + +If the hideCoverImage is true then dont show the image. + +## Acceptance Criteria +The result should follow the figma design. + +### Testing +Add the respective story using storybook for this issue + + +## Current File Structure + +. +├── README.md +├── chromatic.config.json +├── components.json +├── eslint.config.mjs +├── instructions +│ └── instructions.md +├── next.config.js +├── next.config.ts +├── package-lock.json +├── package.json +├── postcss.config.mjs +├── public +│ ├── Frame.svg +│ ├── HallosLetters.svg +│ ├── LogoHallos.svg +│ ├── Spain.svg +│ ├── calendar.svg +│ ├── file.svg +│ ├── globe.svg +│ ├── hallos.png +│ ├── images +│ │ ├── Facebook.png +│ │ ├── GoldRogerProfile2.png +│ │ ├── GroupBookTicketIcon.png +│ │ ├── Instagram.png +│ │ ├── Location.png +│ │ ├── Map.png +│ │ ├── Pinterest.png +│ │ ├── TikTok.png +│ │ ├── Twitter.png +│ │ ├── VISA.png +│ │ ├── dollar.png +│ │ ├── eth.png +│ │ ├── hallos.png +│ │ └── vueltos-un-colocho.png +│ ├── location.svg +│ ├── next.svg +│ ├── nightParty1.png +│ ├── nightParty2.png +│ ├── qr.svg +│ ├── tico-blockchain.jpg +│ ├── vercel.svg +│ └── window.svg +├── src +│ ├── app +│ │ ├── GroupBookTicketIcon.png +│ │ ├── events +│ │ ├── example +│ │ ├── favicon.ico +│ │ ├── globals.css +│ │ ├── layout.tsx +│ │ └── page.tsx +│ ├── components +│ │ ├── Input +│ │ ├── PaymentMethod.tsx +│ │ ├── common +│ │ ├── forms +│ │ ├── layout +│ │ └── ui +│ ├── constants +│ │ ├── countries.ts +│ │ └── formInputs.ts +│ ├── icons +│ │ ├── Calendar.tsx +│ │ ├── Facebook.tsx +│ │ ├── Filter.tsx +│ │ ├── GitHub.tsx +│ │ ├── Instagram.tsx +│ │ ├── Location.tsx +│ │ ├── Loupe.tsx +│ │ ├── PlusMinus.tsx +│ │ ├── Twitter.tsx +│ │ └── index.ts +│ ├── lib +│ │ └── utils.ts +│ ├── stories +│ │ ├── Colors.mdx +│ │ ├── Configure.mdx +│ │ └── assets +│ ├── types +│ │ └── faq.type.ts +│ └── utils +│ ├── events.ts +│ └── faqs.ts +├── tailwind.config.ts +├── tsconfig.json +└── yarn.lock \ No newline at end of file diff --git a/src/components/EventDetailsCover/EventDetailsCover.tsx b/src/components/EventDetailsCover/EventDetailsCover.tsx new file mode 100644 index 0000000..9c553ab --- /dev/null +++ b/src/components/EventDetailsCover/EventDetailsCover.tsx @@ -0,0 +1,57 @@ +import Image from 'next/image'; +import { EventDetailsCoverProps } from './types'; +import { formatEventDate } from '@/utils/dateFormatter'; +import { Calendar, Location } from '@/icons'; + +export const EventDetailsCover = ({ + title, + startDate, + endDate, + location, + coverImage, + hideCoverImage = false +}: EventDetailsCoverProps) => { + return ( +