6
6
defaultWidthHeight ,
7
7
isMobile ,
8
8
onChangeInput ,
9
+ radioButtonWidget ,
9
10
textInputWidget ,
10
11
textWidget
11
12
} from "../../constant/Utils" ;
@@ -232,7 +233,7 @@ function Placeholder(props) {
232
233
233
234
//function to set state value of onclick on widget's setting icon
234
235
const handleWidgetsOnclick = ( ) => {
235
- if ( props . pos . type === "radio" ) {
236
+ if ( props . pos . type === radioButtonWidget ) {
236
237
props . setIsRadio ( true ) ;
237
238
} else if ( props . pos . type === "dropdown" ) {
238
239
props ?. setShowDropdown ( true ) ;
@@ -335,10 +336,14 @@ function Placeholder(props) {
335
336
className = "fa-solid fa-gear settingIcon"
336
337
style = { {
337
338
color : "#188ae2" ,
338
- right : [ "checkbox" , "radio" ] . includes ( props . pos . type )
339
+ right : [ "checkbox" , radioButtonWidget ] . includes (
340
+ props . pos . type
341
+ )
339
342
? "24px"
340
343
: "47px" ,
341
- top : [ "checkbox" , "radio" ] . includes ( props . pos . type )
344
+ top : [ "checkbox" , radioButtonWidget ] . includes (
345
+ props . pos . type
346
+ )
342
347
? "-28px"
343
348
: "-19px"
344
349
} }
@@ -364,12 +369,12 @@ function Placeholder(props) {
364
369
color : "#188ae2" ,
365
370
right :
366
371
props . pos . type === "checkbox" ||
367
- props . pos . type === "radio"
372
+ props . pos . type === radioButtonWidget
368
373
? "8px"
369
374
: "32px" ,
370
375
top :
371
376
props . pos . type === "checkbox" ||
372
- props . pos . type === "radio"
377
+ props . pos . type === radioButtonWidget
373
378
? "-28px"
374
379
: "-18px"
375
380
} }
@@ -457,11 +462,13 @@ function Placeholder(props) {
457
462
style = { {
458
463
color : "#188ae2" ,
459
464
right :
460
- props . pos . type === "checkbox" || props . pos . type === "radio"
465
+ props . pos . type === "checkbox" ||
466
+ props . pos . type === radioButtonWidget
461
467
? "-9px"
462
468
: "12px" ,
463
469
top :
464
- props . pos . type === "checkbox" || props . pos . type === "radio"
470
+ props . pos . type === "checkbox" ||
471
+ props . pos . type === radioButtonWidget
465
472
? "-28px"
466
473
: "-18px"
467
474
} }
@@ -490,11 +497,13 @@ function Placeholder(props) {
490
497
style = { {
491
498
color : "#188ae2" ,
492
499
right :
493
- props . pos . type === "checkbox" || props . pos . type === "radio"
500
+ props . pos . type === "checkbox" ||
501
+ props . pos . type === radioButtonWidget
494
502
? "-27px"
495
503
: "-8px" ,
496
504
top :
497
- props . pos . type === "checkbox" || props . pos . type === "radio"
505
+ props . pos . type === "checkbox" ||
506
+ props . pos . type === radioButtonWidget
498
507
? "-28px"
499
508
: "-18px"
500
509
} }
@@ -526,10 +535,10 @@ function Placeholder(props) {
526
535
props . data && props . isNeedSign
527
536
? props . data ?. signerObjId === props . signerObjId &&
528
537
props . pos . type !== "checkbox" &&
529
- props . pos . type !== "radio"
538
+ props . pos . type !== radioButtonWidget
530
539
? true
531
540
: false
532
- : props . pos . type !== "radio" &&
541
+ : props . pos . type !== radioButtonWidget &&
533
542
props . pos . type !== "checkbox" &&
534
543
props . pos . key === props . selectWidgetId &&
535
544
true ,
@@ -614,31 +623,33 @@ function Placeholder(props) {
614
623
} }
615
624
>
616
625
{ props . isShowBorder &&
617
- props . pos . type !== "radio" &&
626
+ props . pos . type !== radioButtonWidget &&
618
627
props . pos . type !== "checkbox" &&
619
628
props . pos . key === props . selectWidgetId ? (
620
629
< BorderResize
621
630
right = {
622
- props . pos . type === "checkbox" || props . pos . type === "radio"
631
+ props . pos . type === "checkbox" ||
632
+ props . pos . type === radioButtonWidget
623
633
? - 21
624
634
: - 12
625
635
}
626
636
top = {
627
- props . pos . type === "checkbox" || props . pos . type === "radio"
637
+ props . pos . type === "checkbox" ||
638
+ props . pos . type === radioButtonWidget
628
639
? - 21
629
640
: - 11
630
641
}
631
642
/>
632
643
) : props . data && props . isNeedSign && props . pos . type !== "checkbox" ? (
633
644
props . data ?. signerObjId === props . signerObjId &&
634
- props . pos . type !== "radio" &&
645
+ props . pos . type !== radioButtonWidget &&
635
646
props . pos . type !== "checkbox" ? (
636
647
< BorderResize />
637
648
) : (
638
649
< > </ >
639
650
)
640
651
) : (
641
- props . pos . type !== "radio" &&
652
+ props . pos . type !== radioButtonWidget &&
642
653
props . pos . type !== "checkbox" &&
643
654
props . pos . key === props . selectWidgetId && < BorderResize />
644
655
) }
0 commit comments