feat:implement new widgets- initial signature,name,company,job title & date in sign-yourself flow

This commit is contained in:
RaktimaNXG
2024-01-15 19:09:18 +05:30
parent f5d11f9ba6
commit babe17838b
13 changed files with 398 additions and 213 deletions
@@ -1,58 +1,13 @@
import React from "react";
import stamp from "../../assests/stamp2.png";
import sign from "../../assests/sign3.png";
import { themeColor } from "../../utils/ThemeColor/backColor";
import { getWidgetType, widgets } from "../../utils/Utils";
function DragElement({ type, id }) {
const selectedId = id;
return (
<div>
{selectedId === 3 ? (
<div
style={{
display: "flex",
flexDirection: "column",
alignItems: "center",
userSelect: "none",
}}
>
<img
alt="sign img"
style={{
width: "25px",
height: "23px",
background: themeColor(),
}}
src={sign}
/>
<span style={{ color: themeColor(), fontSize: "12px" }}>
Signature
</span>
</div>
) : (
<div
style={{
display: "flex",
flexDirection: "column",
alignItems: "center",
userSelect: "none",
}}
>
<img
alt="stamp img"
style={{
width: "25px",
height: "23px",
background: themeColor(),
}}
src={stamp}
/>
<span style={{ color: themeColor(), fontSize: "12px" }}>Stamp</span>
</div>
)}
</div>
function DragElement(item) {
const getWidgets = widgets;
const filterWidgetPreview = getWidgets.filter(
(data) => data.type === item?.text
);
return <div>{getWidgetType(filterWidgetPreview[0])}</div>;
}
export default DragElement;