Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
refactor: children to trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
hetd54 committed Jun 4, 2024
1 parent 6f96f16 commit 743c73c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/components/HoverCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ interface HoverCardItemProps {
title: string
content: string | React.ReactNode
footer?: string | React.ReactNode
children: React.ReactNode
trigger: React.ReactNode
}

const HoverCardItem: React.FC<HoverCardItemProps> = ({
children,
trigger,
alt,
title,
content,
Expand All @@ -22,7 +22,7 @@ const HoverCardItem: React.FC<HoverCardItemProps> = ({
<HoverCard.Root openDelay={2}>
<HoverCard.Trigger asChild>
<a className="cursor-pointer" rel="noreferrer noopener">
{children}
{trigger}
</a>
</HoverCard.Trigger>
<HoverCard.Portal>
Expand Down
4 changes: 2 additions & 2 deletions src/components/svg/MiniMaps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const MiniMapSvg = () => {
</div>
</>
}
children={<circle cx="99" cy="103" r="16" fill="#317A7C" />}
trigger={<circle cx="99" cy="103" r="16" fill="#317A7C" />}
></HoverCardItem>

<mask id="path-3-inside-2_65_1451" fill="white">
Expand All @@ -67,7 +67,7 @@ const MiniMapSvg = () => {
<p>Princeton, NJ 08544</p>
</>
}
children={<circle cx="524" cy="58" r="16" fill="#317A7C" />}
trigger={<circle cx="524" cy="58" r="16" fill="#317A7C" />}
></HoverCardItem>
</svg>
)
Expand Down

0 comments on commit 743c73c

Please sign in to comment.