첫 커밋

This commit is contained in:
focp212@naver.com
2025-09-05 15:36:48 +09:00
commit 05238b04c1
825 changed files with 176358 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import { useRef, useState } from 'react';
import { useClickAway } from 'react-use';
interface MoreMenuProps {
children: React.ReactNode;
}
export const MoreMenu = ({ children }: MoreMenuProps) => {
const [isOnMoreMenu, setIsOnMoreMenu] = useState(false);
const ref = useRef(null);
useClickAway(ref, () => {
setIsOnMoreMenu(false);
});
return (
<div ref={ref}>
<button type="button" className="btn top-more-btn" onClick={() => setIsOnMoreMenu((prev) => !prev)}>
<span> </span>
</button>
{isOnMoreMenu && <div className="more-menu on">{children}</div>}
</div>
);
};