{canEdit ? (
-
+
,
+ name: "Edit element",
+ onClick: onView,
+ dataTestId: `edit-element-${elementId}`,
+ },
+ {
+ icon:
,
+ name: "Delete element",
+ onClick: () => {
+ onDelete(elementId);
+ },
+ dataTestId: `delete-element-${elementId}`,
+ },
+ {
+ icon:
,
+ name: "Clone element",
+ onClick: () => {
+ onClone(elementId);
+ },
+ dataTestId: `clone-element-${elementId}`,
+ },
+ ]}
+ />
) : (
+ // Case where user can only View.
)}
-
);
}
diff --git a/src/components/editMeasure/testCases/components/editTestCase/qdm/LeftPanel/ElementsTab/Elements/DataElementsTable/dataElementActions/MadieSpeedDial.tsx b/src/components/editMeasure/testCases/components/editTestCase/qdm/LeftPanel/ElementsTab/Elements/DataElementsTable/dataElementActions/MadieSpeedDial.tsx
new file mode 100644
index 000000000..a281bfc5c
--- /dev/null
+++ b/src/components/editMeasure/testCases/components/editTestCase/qdm/LeftPanel/ElementsTab/Elements/DataElementsTable/dataElementActions/MadieSpeedDial.tsx
@@ -0,0 +1,86 @@
+import React, { useState } from "react";
+import { SpeedDial, SpeedDialAction } from "@mui/material";
+
+type Action = {
+ icon: React.ReactNode;
+ name: any;
+ onClick?: Function;
+ dataTestId?: string;
+};
+interface MadieSpeedDialProps {
+ actions?: Action[];
+ dataTestId?: any;
+}
+
+const MadieSpeedDial = (props: MadieSpeedDialProps) => {
+ const { actions, dataTestId } = props;
+ const [open, setOpen] = useState(false);
+
+ return (
+