-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into MAT-7529
- Loading branch information
Showing
11 changed files
with
443 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from "react"; | ||
|
||
const CloneIcon = ({ color }) => { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="20" | ||
height="20" | ||
viewBox="0 0 20 20" | ||
fill={color} | ||
> | ||
<path | ||
d="M1.42857 1.42857H12.8571V4.28571H14.2857V1.42857C14.2857 1.04969 14.1352 0.686328 13.8673 0.418419C13.5994 0.15051 13.236 0 12.8571 0H1.42857C1.04969 0 0.686328 0.15051 0.418419 0.418419C0.15051 0.686328 0 1.04969 0 1.42857V12.8571C0 13.236 0.15051 13.5994 0.418419 13.8673C0.686328 14.1352 1.04969 14.2857 1.42857 14.2857H4.28571V12.8571H1.42857V1.42857Z" | ||
fill="#0073C8" | ||
/> | ||
<path | ||
d="M18.571 5.71436H7.14244C6.76356 5.71436 6.4002 5.86487 6.13229 6.13277C5.86438 6.40068 5.71387 6.76405 5.71387 7.14293V18.5715C5.71387 18.9504 5.86438 19.3137 6.13229 19.5817C6.4002 19.8496 6.76356 20.0001 7.14244 20.0001H18.571C18.9499 20.0001 19.3133 19.8496 19.5812 19.5817C19.8491 19.3137 19.9996 18.9504 19.9996 18.5715V7.14293C19.9996 6.76405 19.8491 6.40068 19.5812 6.13277C19.3133 5.86487 18.9499 5.71436 18.571 5.71436ZM18.571 18.5715H7.14244V7.14293H18.571V18.5715Z" | ||
fill="#0073C8" | ||
/> | ||
<path | ||
d="M12.1427 17.1427H13.5713V13.5713H17.1427V12.1427H13.5713V8.57129H12.1427V12.1427H8.57129V13.5713H12.1427V17.1427Z" | ||
fill="#0073C8" | ||
/> | ||
</svg> | ||
); | ||
}; | ||
|
||
export default CloneIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from "react"; | ||
|
||
const EditIcon = ({ color }) => { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="20" | ||
height="20" | ||
viewBox="0 0 20 20" | ||
fill={color} | ||
> | ||
<path | ||
d="M16.0007 18.6669H1.33339V4.00122H10.1471L11.4805 2.66797H1.33339C0.979754 2.66797 0.640601 2.80844 0.390541 3.05847C0.140482 3.3085 0 3.64762 0 4.00122V18.6669C0 19.0205 0.140482 19.3596 0.390541 19.6097C0.640601 19.8597 0.979754 20.0002 1.33339 20.0002H16.0007C16.3543 20.0002 16.6935 19.8597 16.9436 19.6097C17.1936 19.3596 17.3341 19.0205 17.3341 18.6669V8.66758L16.0007 10.0008V18.6669Z" | ||
fill="#0073C8" | ||
/> | ||
<path | ||
d="M19.6846 2.56191L17.4378 0.315392C17.3381 0.215418 17.2196 0.136099 17.0892 0.0819787C16.9588 0.0278582 16.819 0 16.6778 0C16.5365 0 16.3967 0.0278582 16.2663 0.0819787C16.1359 0.136099 16.0174 0.215418 15.9177 0.315392L6.77732 9.50813L6.03729 12.7146C6.00576 12.87 6.00907 13.0305 6.04699 13.1845C6.08491 13.3385 6.15649 13.4822 6.25658 13.6052C6.35667 13.7282 6.48279 13.8275 6.62586 13.896C6.76892 13.9645 6.92539 14.0004 7.084 14.0012C7.16598 14.0102 7.2487 14.0102 7.33068 14.0012L10.5642 13.2879L19.6846 4.08181C19.7845 3.98211 19.8639 3.86367 19.918 3.73326C19.9721 3.60286 20 3.46305 20 3.32186C20 3.18067 19.9721 3.04087 19.918 2.91046C19.8639 2.78006 19.7845 2.66161 19.6846 2.56191ZM9.87079 12.0546L7.43068 12.5946L7.99737 10.1748L14.8777 3.24853L16.7578 5.12841L9.87079 12.0546ZM17.5111 4.37513L15.631 2.49525L16.6644 1.44198L18.5578 3.3352L17.5111 4.37513Z" | ||
fill="#0073C8" | ||
/> | ||
</svg> | ||
); | ||
}; | ||
|
||
export default EditIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86 changes: 86 additions & 0 deletions
86
...dm/LeftPanel/ElementsTab/Elements/DataElementsTable/dataElementActions/MadieSpeedDial.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ( | ||
<div | ||
style={{ | ||
color: "#0073C8", | ||
}} | ||
> | ||
<SpeedDial | ||
ariaLabel={dataTestId ? dataTestId : "action-center"} | ||
data-testId={dataTestId ? dataTestId : "action-center-button"} | ||
sx={{ | ||
pointerEvents: "all", | ||
"& .MuiSpeedDial-fab": { | ||
width: 40, | ||
height: 40, | ||
backgroundColor: "white", | ||
color: "grey", | ||
border: "solid 1px #0073C8", | ||
boxShadow: "none", | ||
"&:hover": { | ||
backgroundColor: "#f0f0f0", | ||
}, | ||
}, | ||
}} | ||
icon={ | ||
<div | ||
data-testid="action-center-actual-icon" | ||
style={{ | ||
display: "flex", | ||
alignItems: "center", | ||
justifyContent: "center", | ||
transition: "transform 0.3s", | ||
transform: open ? "rotate(90deg)" : "none", | ||
}} | ||
> | ||
<div style={{ margin: "0 2px", color: "#0073C8" }}>•</div> | ||
<div style={{ margin: "0 2px", color: "#0073C8" }}>•</div> | ||
<div style={{ margin: "0 2px", color: "#0073C8" }}>•</div> | ||
</div> | ||
} | ||
direction="right" | ||
open={open} | ||
onClick={() => setOpen((prevOpen) => !prevOpen)} | ||
> | ||
{actions?.map((action) => ( | ||
<SpeedDialAction | ||
key={action.name} | ||
icon={action.icon} | ||
tooltipTitle={action.name} | ||
data-testid={action?.dataTestId} | ||
onClick={() => { | ||
setOpen(false); | ||
action.onClick(); | ||
}} | ||
sx={{ | ||
boxShadow: "none", | ||
transition: "opacity 0s, visibility 0s", | ||
margin: 0, | ||
marginRight: 1, | ||
transitionDelay: "0s", | ||
}} | ||
/> | ||
))} | ||
</SpeedDial> | ||
</div> | ||
); | ||
}; | ||
|
||
export default MadieSpeedDial; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.