Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/ui/common/assets/three-dots-black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 18 additions & 3 deletions src/ui/common/components/ThreeDotsMenu/ThreeDotsMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { Popover, Text } from "@babylonlabs-io/core-ui";
import { useState } from "react";
import { useTheme } from "next-themes";
import { useEffect, useState } from "react";

import threeDots from "@/ui/common/assets/three-dots.svg";
import threeDotsDark from "@/ui/common/assets/three-dots-black.svg";
import threeDotsLight from "@/ui/common/assets/three-dots.svg";

interface ThreeDotsMenuProps {
onChange: () => void;
Expand All @@ -16,6 +18,12 @@ export const ThreeDotsMenu = ({
}: ThreeDotsMenuProps) => {
const [open, setOpen] = useState(false);
const [anchorEl, setAnchorEl] = useState<HTMLButtonElement | null>(null);
const { resolvedTheme } = useTheme();
const [mounted, setMounted] = useState(false);

useEffect(() => {
setMounted(true);
}, []);

return (
<>
Expand All @@ -25,7 +33,14 @@ export const ThreeDotsMenu = ({
className={className}
aria-label="Open options"
>
<img src={threeDots} alt="options" width={20} height={20} />
{mounted && (
<img
src={resolvedTheme === "light" ? threeDotsDark : threeDotsLight}
alt="options"
width={20}
height={20}
/>
)}
</button>

<Popover
Expand Down