-
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.
* Update timeline legend componenmt and add header to legends
- Loading branch information
1 parent
2c9fa63
commit a98f883
Showing
9 changed files
with
122 additions
and
141 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
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
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
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,36 @@ | ||
import { PopoverClose } from '@radix-ui/react-popover'; | ||
import { Info, X } from 'lucide-react'; | ||
|
||
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'; | ||
|
||
type LegendHeaderProps = { | ||
title?: string; | ||
info?: string; | ||
}; | ||
|
||
const LegendHeader = ({ title, info }: LegendHeaderProps) => { | ||
return ( | ||
<div className="font-open-sans mb-4 flex items-center justify-between gap-2 text-white"> | ||
{!!title && <div className="text-sm font-semibold text-white">{title}</div>} | ||
{!!info && ( | ||
<Popover> | ||
<PopoverTrigger> | ||
<Info className="h-4 w-4 stroke-white" /> | ||
</PopoverTrigger> | ||
|
||
<PopoverContent className="border-none bg-[#003247] text-xs text-white"> | ||
<div className="mb-2 flex justify-between text-sm font-semibold"> | ||
{title} | ||
<PopoverClose> | ||
<X className="h-4 w-4 stroke-white" /> | ||
</PopoverClose> | ||
</div> | ||
{info} | ||
</PopoverContent> | ||
</Popover> | ||
)} | ||
</div> | ||
); | ||
}; | ||
|
||
export default LegendHeader; |
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
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
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
Oops, something went wrong.