-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
864 additions
and
551 deletions.
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,20 +1,23 @@ | ||
import { ContributorsDetails } from "./detail"; | ||
import { ProgressBarPrototype } from "./progress-bar"; | ||
import { ContributorsDetails } from './detail'; | ||
import { ProgressBarPrototype } from './progress-bar'; | ||
|
||
export const AttendeeHeatMap = () => { | ||
return ( | ||
<div className="flex flex-col gap-2"> | ||
<div className="flex ws-full h-[60px] gap-2 items-end"> | ||
<h1 className="font-[500] text-[48px] leading-[48px] ">1.894</h1> | ||
<p className="font-light text-[16px] leading-[24px]">Contributors</p> | ||
</div> | ||
<ProgressBarPrototype /> | ||
<div className="w-full"> | ||
{/* row one */} | ||
<div className="w-full h-[98px] py-4 gap-4 flex border-[#F5F5F5] "> | ||
<ContributorsDetails /> | ||
return ( | ||
<div className="flex flex-col gap-2"> | ||
<div className="flex w-full gap-2 items-end"> | ||
<h1 className="font-[500] text-[48px] leading-[48px] "> | ||
1.894 | ||
</h1> | ||
<p className="font-light text-[16px] leading-[24px]"> | ||
Contributors | ||
</p> | ||
</div> | ||
<ProgressBarPrototype /> | ||
<div className="w-full"> | ||
<div className="w-full py-4 gap-4 flex border-[#F5F5F5] "> | ||
<ContributorsDetails /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
); | ||
}; |
33 changes: 16 additions & 17 deletions
33
app/components/atoms/contributors/contributor-summary-card.tsx
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,20 +1,19 @@ | ||
import { Card } from "@/components/ui/card"; | ||
import { AttendeeHeatMap } from "./attendee-heat-map"; | ||
import { ContributorDropdown } from "./contributor-dropdown"; | ||
import { Card } from '@/components/ui/card'; | ||
import { AttendeeHeatMap } from './attendee-heat-map'; | ||
import { ContributorDropdown } from './contributor-dropdown'; | ||
|
||
export const ContributorSummaryCard = () => { | ||
return ( | ||
<Card className="shadow-none"> | ||
<div className="border h-[376px] p-4 rounded-md"> | ||
<div className="w-full h-[56px] gap-[16px] flex justify-between"> | ||
<h1 className="leading-[28px] text-[18px] font-[500px] "> | ||
Total Contributors | ||
</h1> | ||
<ContributorDropdown /> | ||
</div> | ||
{/* Attendance heat map */} | ||
<AttendeeHeatMap /> | ||
</div> | ||
</Card> | ||
); | ||
return ( | ||
<Card className="shadow-none w-full"> | ||
<div className="border p-4 rounded-md"> | ||
<div className="w-full h-[56px] gap-[16px] flex justify-between"> | ||
<h1 className="leading-[28px] text-[18px] font-[500px] "> | ||
Total Contributors | ||
</h1> | ||
<ContributorDropdown /> | ||
</div> | ||
<AttendeeHeatMap /> | ||
</div> | ||
</Card> | ||
); | ||
}; |
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,28 +1,31 @@ | ||
import { ContributorsSummaryData } from "@/data/contributors"; | ||
import { ContributorsSummaryData } from '@/data/contributors'; | ||
|
||
export const ContributorsDetails = () => { | ||
return ( | ||
<div className="grid grid-cols-2 gap-8 mt-2"> | ||
{ContributorsSummaryData.map((item) => ( | ||
<div key={item.color} className="w-[301px] gap-[4px] flex flex-col"> | ||
<div className="gap-2 flex items-center"> | ||
<div | ||
className={`w-[14px] rounded-[999px] bg-${item.color}-600 h-2`} | ||
/> | ||
<h1 className="leading-[24px] text-[16px] font-light text-[#595959] capitalize"> | ||
{item.title} | ||
</h1> | ||
</div> | ||
<span className="flex items-end gap-2"> | ||
<h1 className="font-light text-[30px] leading-[38px] "> | ||
{item.value} | ||
</h1> | ||
<p className="font-light text-[16px] leading-[24px]"> | ||
Contributors | ||
</p> | ||
</span> | ||
return ( | ||
<div className="grid grid-cols-2 xl:grid-cols-4 gap-8 mt-2"> | ||
{ContributorsSummaryData.map((item) => ( | ||
<div | ||
key={item.color} | ||
className="w-full gap-[4px] flex flex-col" | ||
> | ||
<div className="gap-2 flex items-center"> | ||
<div | ||
className={`w-[14px] rounded-[999px] bg-${item.color}-600 h-2`} | ||
/> | ||
<h1 className="leading-[24px] text-[16px] font-light text-[#595959] capitalize"> | ||
{item.title} | ||
</h1> | ||
</div> | ||
<span className="flex items-end gap-2"> | ||
<h1 className="font-light text-[30px] leading-[38px] "> | ||
{item.value} | ||
</h1> | ||
<p className="font-light text-[16px] leading-[24px]"> | ||
Contributors | ||
</p> | ||
</span> | ||
</div> | ||
))} | ||
</div> | ||
))} | ||
</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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
export const ProgressBarPrototype = () => { | ||
return ( | ||
<div className="flex gap-2 h-2"> | ||
<span className="w-[368px] rounded-[2px] bg-blue-600 h-full" /> | ||
<span className="w-[81px] rounded-[2px] bg-green-600 h-full" /> | ||
<span className="w-[117px] rounded-[2px] bg-red-600 h-full" /> | ||
<span className="w-[40px] rounded-[2px] bg-orange-600 h-full" /> | ||
</div> | ||
); | ||
return ( | ||
<div className="flex gap-2 h-2"> | ||
<span className="w-[calc(25%-0px)] rounded-[2px] bg-blue-600 h-full" /> | ||
<span className="w-[calc(25%-0px)] rounded-[2px] bg-green-600 h-full" /> | ||
<span className="w-[calc(25%-0px)] rounded-[2px] bg-red-600 h-full" /> | ||
<span className="w-[calc(25%-0px)] rounded-[2px] bg-orange-600 h-full" /> | ||
</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 |
---|---|---|
@@ -1,24 +1,28 @@ | ||
import { NavLink } from "@remix-run/react"; | ||
import type { LucideIcon } from "lucide-react"; | ||
import { cn } from '@/lib/utils'; | ||
import { NavLink } from '@remix-run/react'; | ||
import type { LucideIcon } from 'lucide-react'; | ||
|
||
interface NavItemProps { | ||
label: string; | ||
href: string; | ||
icon: LucideIcon; | ||
label: string; | ||
href: string; | ||
icon: LucideIcon; | ||
} | ||
|
||
export const NavItem = ({ label, href, icon: Icon }: NavItemProps) => { | ||
return ( | ||
<NavLink | ||
to={href} | ||
className={({ isActive }) => | ||
isActive | ||
? "flex text-lg items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary bg-slate-100" | ||
: "flex text-lg items-center gap-3 rounded-lg px-3 py-2 text-muted-foreground transition-all hover:text-primary" | ||
} | ||
> | ||
<Icon className="h-4 w-4" /> | ||
{label} | ||
</NavLink> | ||
); | ||
return ( | ||
<NavLink | ||
to={href} | ||
className={({ isActive }) => | ||
cn( | ||
'flex lg:text-lg items-center gap-3 rounded-lg px-3 py-2 transition-all hover:text-primary', | ||
isActive | ||
? 'bg-muted text-muted-foreground' | ||
: 'text-muted-foreground', | ||
) | ||
} | ||
> | ||
<Icon className="h-4 w-4" /> | ||
{label} | ||
</NavLink> | ||
); | ||
}; |
Oops, something went wrong.