This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from brown-ccv/home-page
Home page
- Loading branch information
Showing
10 changed files
with
641 additions
and
5 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,49 @@ | ||
import React from "react" | ||
import * as HoverCard from "@radix-ui/react-hover-card" | ||
|
||
interface HoverCardItemProps { | ||
image?: string | ||
alt?: string | ||
title: string | ||
content: string | React.ReactNode | ||
footer?: string | React.ReactNode | ||
trigger: React.ReactNode | ||
} | ||
|
||
const HoverCardItem: React.FC<HoverCardItemProps> = ({ | ||
trigger, | ||
alt, | ||
title, | ||
content, | ||
footer, | ||
image, | ||
}) => { | ||
return ( | ||
<HoverCard.Root openDelay={2}> | ||
<HoverCard.Trigger asChild> | ||
<a className="cursor-pointer" rel="noreferrer noopener"> | ||
{trigger} | ||
</a> | ||
</HoverCard.Trigger> | ||
<HoverCard.Portal> | ||
<HoverCard.Content sideOffset={5}> | ||
<div className="bg-white p-5 rounded shadow flex flex-col gap-3.5"> | ||
{image && alt && <img className="w-14 h-14 rounded-full" src={image} alt={alt} />} | ||
<div className="flex flex-col gap-3.5"> | ||
<p className="font-semibold">{title}</p> | ||
<div>{content}</div> | ||
{footer && ( | ||
<div className="flex gap-3.5"> | ||
<p>{footer}</p> | ||
</div> | ||
)} | ||
</div> | ||
</div> | ||
<HoverCard.Arrow className="fill-white" /> | ||
</HoverCard.Content> | ||
</HoverCard.Portal> | ||
</HoverCard.Root> | ||
) | ||
} | ||
|
||
export default HoverCardItem |
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,23 @@ | ||
import React from "react" | ||
|
||
interface CircleProps { | ||
styling: string | ||
} | ||
|
||
const CircleIcon: React.FC<CircleProps> = ({ styling }) => { | ||
return ( | ||
<> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="48" | ||
height="48" | ||
viewBox="0 0 24 24" | ||
className={styling} | ||
> | ||
<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"></path> | ||
</svg> | ||
</> | ||
) | ||
} | ||
|
||
export default CircleIcon |
Oops, something went wrong.