Skip to content

Commit

Permalink
minor styles adjustments to popup
Browse files Browse the repository at this point in the history
  • Loading branch information
andresgnlez authored and Andrés González committed Nov 13, 2024
1 parent 00839cc commit a1ef257
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
12 changes: 5 additions & 7 deletions client/src/components/map/popup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ export default function MapPopup({ children }: PropsWithChildren) {
className="bg-transparent text-sm"
maxWidth="320"
>
<div className="flex flex-col gap-2">
<>
<button type="button" onClick={closePopup} className="self-end">
<XIcon className="h-5 w-5 text-foreground hover:text-muted-foreground" />
</button>
{children}
</>
<div className="flex flex-col">
<button type="button" onClick={closePopup} className="self-end">
<XIcon className="h-4 w-4 text-foreground hover:text-muted-foreground" />
</button>
{children}
</div>
</Popup>
);
Expand Down
10 changes: 3 additions & 7 deletions client/src/containers/projects/map/popup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { cn } from "@/lib/utils";
import { popupAtom } from "@/app/(overview)/store";

import MapPopup from "@/components/map/popup";
import { Badge } from "@/components/ui/badge";

const HEADER_CLASSES = "py-0.5 text-left font-normal text-muted-foreground";
const CELL_CLASSES = "py-0.5 font-semibold";
Expand All @@ -17,14 +16,11 @@ export default function CostAbatementPopup() {
return (
<MapPopup>
<div className="flex items-center justify-between">
<span className="font-semibold">
<span className="font-semibold leading-none">
{popup?.features?.[0]?.properties?.country}
</span>
<Badge variant="outline" className="pointer-events-none">
SUM
</Badge>
</div>
<table>
<table className="mt-2">
<thead>
<tr>
<th className={cn(HEADER_CLASSES, "pr-2")}>Cost</th>
Expand All @@ -44,7 +40,7 @@ export default function CostAbatementPopup() {
</tr>
</tbody>
</table>
<p className="text-xs text-muted-foreground">
<p className="mt-2 text-xs text-muted-foreground">
Values for the SUM of all projects.
</p>
</MapPopup>
Expand Down

0 comments on commit a1ef257

Please sign in to comment.