-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event card #25
Merged
Event card #25
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
70ffdd1
made button prototype
hanahkim1 24cb64f
date was displayed twice, fixed to display date and address
tomasmaranga b7a37e4
changes during meeting
tomasmaranga 23f6c62
green/red based on full or not, color stuff
tomasmaranga 7331a4c
changed text box sizes
hanahkim1 41f02a0
fixed margin for icon to line up with title
tomasmaranga 9d5a9dc
small fixes
tomasmaranga 48489b5
very small tailwind change
a1cddc5
formatted date, made date props
tomasmaranga 00be87e
small fix
tomasmaranga File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
"use client"; | ||
import React from "react"; | ||
import EventCard from "@components/EventCard"; | ||
|
||
export default function Home() { | ||
return <div className="flex items-center justify-center h-screen"></div>; | ||
return ( | ||
<div className="flex items-center justify-center h-screen"> | ||
<EventCard | ||
title="Dewick Community Meal" | ||
date="12:30 PM - 9:30 PM" | ||
address="25 Latin Way, Medford, MA 02155" | ||
volunteers={25} | ||
maxVolunteers={25} | ||
/> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import React from "react"; | ||
import { Icon } from "@iconify/react/dist/iconify.js"; | ||
|
||
interface EventCardProps { | ||
title: string; | ||
date: string; | ||
address: string; | ||
volunteers: number; | ||
maxVolunteers: number; | ||
} | ||
|
||
const EventCard = ({ | ||
title, | ||
date, | ||
address, | ||
volunteers, | ||
maxVolunteers, | ||
}: EventCardProps) => { | ||
const isFull = volunteers === maxVolunteers ? true : false; | ||
const volunteerText = volunteers + "/" + maxVolunteers + " volunteers"; | ||
|
||
return ( | ||
<div className="w-[360px] h-auto px-5 py-5 bg-white rounded-lg shadow border border-[#e4e7ec] flex-col justify-start items-start gap-4 inline-flex"> | ||
<div className="self-stretch justify-start items-center inline-flex"> | ||
<div className="grow shrink basis-0 flex-col justify-start items-start gap-4 inline-flex"> | ||
<div className="self-stretch justify-start items-start gap-2 inline-flex"> | ||
<div className="w-full grow shrink basis-0 text-[#101828] text-base font-semibold font-['Sofia Pro'] leading-[18px] "> | ||
{title} | ||
</div> | ||
</div> | ||
<div className="self-stretch justify-start items-end gap-4 inline-flex"> | ||
<div className="grow shrink basis-0 flex-col justify-start items-start gap-3 inline-flex"> | ||
<div className="w-full self-stretch flex flex-row items-center text-[#344054] text-sm font-medium font-['Sofia Pro'] text-[14px] leading-[20px]"> | ||
<Icon | ||
icon="mdi:clock-outline" | ||
width="12" | ||
height="12" | ||
className="mr-2" | ||
/> | ||
{date} | ||
</div> | ||
<div className="w-full self-stretch flex flex-row items-center text-[#344054] text-sm font-medium font-['Sofia Pro'] text-[14px] leading-[20px]"> | ||
<Icon | ||
icon="mingcute:location-line" | ||
width="12" | ||
height="12" | ||
className="mr-2" | ||
/> | ||
{address} | ||
</div> | ||
<div className="w-full border-b border-0.5 border-[#F2F4F7]"> | ||
{" "} | ||
</div> | ||
<div className="self-stretch justify-start items-center inline-flex"> | ||
<div | ||
className={`w-[153px] h-[20px] grow shrink basis-0 text-[#475466] text-sm font-['Sofia Pro'] pr-3 text-[14px] font-semibold leading-[20px] ${ | ||
isFull ? "text-[#E61932]" : "text-[#558D22]" | ||
}`} | ||
> | ||
{volunteerText} | ||
</div> | ||
<button className="flex justify-end flex-row gap-x-2 bg-teal-600 px-3.5 py-1 text-white rounded-lg place-items-center text-[14px] font-semibold leading-[20px]"> | ||
See details | ||
<Icon icon="formkit:arrowright" width="20" height="21" /> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default EventCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to remove the EventCard component here after you're done testing!