Skip to content

Commit 1c4c2e8

Browse files
refactor: change design of widgets in mobile
1 parent 4fda5b4 commit 1c4c2e8

File tree

4 files changed

+18
-32
lines changed

4 files changed

+18
-32
lines changed

apps/OpenSign/src/components/pdf/WidgetComponent.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ function WidgetComponent({
239239
const updateWidgets = isSignYourself
240240
? filterWidgets
241241
: isTemplateFlow
242-
? textWidgetData
243-
: widget;
242+
? textWidgetData
243+
: widget;
244244

245245
return (
246246
<>
@@ -264,11 +264,7 @@ function WidgetComponent({
264264
alignItems: "center",
265265
justifyContent: "center"
266266
}}
267-
onClick={() => {
268-
// if (signersdata?.length) {
269-
handleModal();
270-
// }
271-
}}
267+
onClick={() => handleModal()}
272268
>
273269
<span
274270
style={{
@@ -346,7 +342,7 @@ function WidgetComponent({
346342
display: "flex",
347343
overflowX: "scroll",
348344
whiteSpace: "nowrap",
349-
padding: "10px"
345+
padding: "10px 5px 10px 1px"
350346
}}
351347
>
352348
<WidgetList

apps/OpenSign/src/components/pdf/WidgetList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { getWidgetType } from "../../constant/Utils";
44
function WidgetList(props) {
55
return props.updateWidgets.map((item, ind) => {
66
return (
7-
<div key={ind} style={{ marginBottom: "10px" }}>
7+
<div key={ind} style={{ marginBottom: "5px" }}>
88
<div
99
className="widgets"
1010
onClick={() => {

apps/OpenSign/src/constant/Utils.js

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -288,26 +288,14 @@ export const getWidgetType = (item, marginLeft) => {
288288
marginLeft: marginLeft && `${marginLeft}px`
289289
}}
290290
>
291-
<div
292-
style={{
293-
display: "flex",
294-
alignItems: "center",
295-
marginLeft: "5px"
296-
}}
297-
>
298-
<i
299-
className="fa-sharp fa-solid fa-grip-vertical"
300-
style={{ color: "#908d8d", fontSize: "13px" }}
301-
></i>
302-
<span
303-
style={{
304-
fontWeight: "400",
305-
fontSize: "15px",
306-
// padding: "3px 20px 0px 20px",
307-
color: "black",
308-
marginLeft: "5px"
309-
}}
310-
>
291+
<div className="flex items-center mr-1">
292+
{!isMobile && (
293+
<i
294+
className="fa-sharp fa-solid fa-grip-vertical"
295+
style={{ color: "#908d8d", fontSize: "13px", marginLeft: 4 }}
296+
></i>
297+
)}
298+
<span className=" font-[400] text-[15px] text-black ml-[5px]">
311299
{item.type}
312300
</span>
313301
</div>
@@ -1090,8 +1078,8 @@ export const multiSignEmbed = async (
10901078
position.type === radioButtonWidget
10911079
? 10
10921080
: position.type === "checkbox"
1093-
? 10
1094-
: newUpdateHeight;
1081+
? 10
1082+
: newUpdateHeight;
10951083
const newHeight = ind ? (ind > 0 ? widgetHeight : 0) : widgetHeight;
10961084

10971085
if (signyourself) {

apps/OpenSign/src/styles/signature.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@
163163

164164
.signatureBtn {
165165
border: 1.5px solid #47a3ad;
166-
167166
border-radius: 3px;
168167
display: flex;
169168
padding: 0px;
@@ -1192,6 +1191,9 @@ option {
11921191
min-width: 90%;
11931192
overflow-y: auto;
11941193
}
1194+
.signatureBtn {
1195+
width: max-content;
1196+
}
11951197

11961198
.dropdownModal {
11971199
position: fixed;

0 commit comments

Comments
 (0)