|
|
@ -1,6 +1,6 @@ |
|
|
|
import { useRef, useState } from 'react'; |
|
|
|
import { useRef, useState } from 'react'; |
|
|
|
import { useOutsideClick } from '../../hooks/use-outside-click'; |
|
|
|
import { useOutsideClick } from '../../hooks/use-outside-click'; |
|
|
|
import { Lock, MoreVertical, Shapes, Trash2 } from 'lucide-react'; |
|
|
|
import { Lock, MoreVertical, PenSquare, Shapes, Trash2 } from 'lucide-react'; |
|
|
|
|
|
|
|
|
|
|
|
type RoadmapActionButtonProps = { |
|
|
|
type RoadmapActionButtonProps = { |
|
|
|
onDelete?: () => void; |
|
|
|
onDelete?: () => void; |
|
|
@ -32,34 +32,34 @@ export function RoadmapActionButton(props: RoadmapActionButtonProps) { |
|
|
|
{isOpen && ( |
|
|
|
{isOpen && ( |
|
|
|
<div |
|
|
|
<div |
|
|
|
ref={menuRef} |
|
|
|
ref={menuRef} |
|
|
|
className="align-right absolute right-0 top-full mt-1 w-[140px] rounded-md bg-slate-800 px-2 py-2 text-white shadow-md z-[9999]" |
|
|
|
className="align-right absolute right-0 top-full z-[9999] mt-1 w-[140px] rounded-md bg-slate-800 px-2 py-2 text-white shadow-md" |
|
|
|
> |
|
|
|
> |
|
|
|
<ul> |
|
|
|
<ul> |
|
|
|
{onUpdateSharing && ( |
|
|
|
{onCustomize && ( |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<button |
|
|
|
<button |
|
|
|
onClick={() => { |
|
|
|
onClick={() => { |
|
|
|
setIsOpen(false); |
|
|
|
setIsOpen(false); |
|
|
|
onUpdateSharing(); |
|
|
|
onCustomize(); |
|
|
|
}} |
|
|
|
}} |
|
|
|
className="flex w-full cursor-pointer items-center rounded p-2 text-sm font-medium text-slate-100 hover:bg-slate-700" |
|
|
|
className="flex w-full cursor-pointer items-center rounded p-2 text-sm font-medium text-slate-100 hover:bg-slate-700" |
|
|
|
> |
|
|
|
> |
|
|
|
<Lock size={14} className="mr-2" /> |
|
|
|
<PenSquare size={14} className="mr-2" /> |
|
|
|
Sharing |
|
|
|
Edit |
|
|
|
</button> |
|
|
|
</button> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
)} |
|
|
|
)} |
|
|
|
{onCustomize && ( |
|
|
|
{onUpdateSharing && ( |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<button |
|
|
|
<button |
|
|
|
onClick={() => { |
|
|
|
onClick={() => { |
|
|
|
setIsOpen(false); |
|
|
|
setIsOpen(false); |
|
|
|
onCustomize(); |
|
|
|
onUpdateSharing(); |
|
|
|
}} |
|
|
|
}} |
|
|
|
className="flex w-full cursor-pointer items-center rounded p-2 text-sm font-medium text-slate-100 hover:bg-slate-700" |
|
|
|
className="flex w-full cursor-pointer items-center rounded p-2 text-sm font-medium text-slate-100 hover:bg-slate-700" |
|
|
|
> |
|
|
|
> |
|
|
|
<Shapes size={14} className="mr-2" /> |
|
|
|
<Lock size={14} className="mr-2" /> |
|
|
|
Customize |
|
|
|
Sharing |
|
|
|
</button> |
|
|
|
</button> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
)} |
|
|
|
)} |
|
|
|