fix(sideBarDraggableComponent): fix alignment and positioning of select trigger and select content

feat(sideBarDraggableComponent): add support for download option in select content
feat(sideBarDraggableComponent): add support for delete option in select content for non-official items
This commit is contained in:
cristhianzl 2024-01-17 16:57:02 -03:00
commit bd0d0cb1b2

View file

@ -1,3 +1,4 @@
import { SelectTrigger } from "@radix-ui/react-select";
import { DragEventHandler, forwardRef, useRef, useState } from "react";
import IconComponent from "../../../../../components/genericIconComponent";
import {
@ -106,6 +107,7 @@ export const SidebarDraggableComponent = forwardRef(
);
}}
>
<SelectTrigger className="w-full text-left">
<div
data-testid={sectionName + display_name}
id={sectionName + display_name}
@ -120,12 +122,8 @@ export const SidebarDraggableComponent = forwardRef(
<SelectContent
position="popper"
side="bottom"
sideOffset={-25}
style={{
position: "absolute",
left: cursorPos.x,
top: cursorPos.y,
}}
sideOffset={-15}
alignOffset={25}
>
<SelectItem value={"download"}>
<div className="flex">
@ -150,6 +148,7 @@ export const SidebarDraggableComponent = forwardRef(
</SelectContent>
</div>
</div>
</SelectTrigger>
</div>
</div>
</Select>