@@ -654,24 +654,12 @@ export const Remove = styled.div<{ $isList: boolean }>`
654
654
` ;
655
655
656
656
export const Event = styled . div < {
657
- $bg : string ;
658
657
theme : Object ;
659
658
$isList : boolean ;
660
659
$allDay : boolean ;
661
660
$style : CalendarStyleType ;
662
661
$backgroundColor :string ;
663
- $detail :string ;
664
- $titleColor :string ;
665
- $detailColor :string ;
666
- $titleFontWeight :string ;
667
- $titleFontStyle :string ;
668
- $detailFontWeight :string ;
669
- $detailFontStyle :string ;
670
- $animation ?: any ;
671
- $animationDelay ?: any ;
672
- $animationDuration ?: any ;
673
- $animationIterationCount ?: any ;
674
-
662
+ $extendedProps : any ;
675
663
} > `
676
664
height: 100%;
677
665
width: 100%;
@@ -680,17 +668,17 @@ export const Event = styled.div<{
680
668
box-shadow: ${ ( props ) => ! props . $isList && "0 0 5px 0 rgba(0, 0, 0, 0.15)" } ;
681
669
border: 1px solid ${ ( props ) => props . $style . border } ;
682
670
display: ${ ( props ) => props . $isList && "flex" } ;
683
- background-color:${ ( props ) => props . $backgroundColor } ;
671
+ background-color:${ ( props ) => props ? .$backgroundColor || "#ffffff" } ;
684
672
overflow: hidden;
685
673
font-size: 13px;
686
674
line-height: 19px;
687
675
padding-right: 20px;
688
676
overflow: hidden;
689
677
position: relative;
690
- animation: ${ ( props ) => props ?. $animation } ;
691
- animation-delay: ${ ( props ) => props ?. $animationDelay } ;
692
- animation-duration: ${ ( props ) => props ?. $animationDuration } ;
693
- animation-iteration-count: ${ ( props ) => props ?. $animationIterationCount } ;
678
+ animation: ${ ( props ) => props ?. $extendedProps ?. animation || "" } ;
679
+ animation-delay: ${ ( props ) => props ?. $extendedProps ?. animationDelay || "" } ;
680
+ animation-duration: ${ ( props ) => props ?. $extendedProps ?. animationDuration || "" } ;
681
+ animation-iteration-count: ${ ( props ) => props ?. $extendedProps ?. animationIterationCount || "" } ;
694
682
&::before {
695
683
content: "";
696
684
position: absolute;
@@ -700,7 +688,7 @@ export const Event = styled.div<{
700
688
left: 2px;
701
689
top: 2px;
702
690
border-radius: 3px;
703
- background-color: ${ ( props ) => props . $bg } ;
691
+ background-color: ${ ( props ) => props . $extendedProps ?. color } ;
704
692
}
705
693
706
694
.event-time {
@@ -714,17 +702,17 @@ export const Event = styled.div<{
714
702
margin-top: 2px;
715
703
}
716
704
.event-title {
717
- color: ${ ( props ) => props . $ titleColor} ;
718
- font-weight: ${ ( props ) => props . $ titleFontWeight} ;
719
- font-style: ${ ( props ) => props . $ titleFontStyle} ;
705
+ color: ${ ( props ) => props ?. $extendedProps ?. titleColor || "#000000" } ;
706
+ font-weight: ${ ( props ) => props ?. $extendedProps ?. titleFontWeight || "normal" } ;
707
+ font-style: ${ ( props ) => props ?. $extendedProps ?. titleFontStyle || "" } ;
720
708
margin-left: 15px;
721
709
white-space: pre-wrap;
722
710
word-break: break-word;
723
711
}
724
712
.event-detail {
725
- color: ${ ( props ) => props . $ detailColor} ;
726
- font-weight: ${ ( props ) => props . $ detailFontWeight} ;
727
- font-style: ${ ( props ) => props . $ detailFontStyle} ;
713
+ color: ${ ( props ) => props ?. $extendedProps ?. detailColor || "#000000" } ;
714
+ font-weight: ${ ( props ) => props ?. $extendedProps ?. detailFontWeight || "normal" } ;
715
+ font-style: ${ ( props ) => props ?. $extendedProps ?. detailFontStyle || "italic" } ;
728
716
margin-left: 15px;
729
717
white-space: pre-wrap;
730
718
word-break: break-word;
@@ -762,9 +750,9 @@ export const Event = styled.div<{
762
750
}
763
751
&.past {
764
752
background-color: ${ ( props ) =>
765
- `rgba(${ props . $style . bg } , 0.3)` } ;
753
+ `rgba(${ props ?. $extendedProps ?. color } , 0.3)` } ;
766
754
&::before {
767
- background-color: ${ ( props ) => props . $style . bg } ;
755
+ background-color: ${ ( props ) => props ?. $extendedProps ?. color } ;
768
756
opacity: 0.3;
769
757
}
770
758
&::before,
@@ -780,10 +768,10 @@ export const Event = styled.div<{
780
768
781
769
782
770
export const FormWrapper = styled ( Form ) < {
783
- $modaltyle : EventModalStyleType
771
+ $modalStyle : EventModalStyleType
784
772
} > `
785
773
.ant-form-item-label {
786
- width: 120px ;
774
+ width: 125px ;
787
775
text-align: left;
788
776
line-height: 18px;
789
777
@@ -801,11 +789,11 @@ export const FormWrapper = styled(Form)<{
801
789
802
790
// Setting style for input fields
803
791
.ant-input {
804
- background-color: ${ ( props ) => props . $modaltyle . labelBackground } ;
805
- border-color: ${ ( props ) => props . $modaltyle . border } ;
806
- border-width: ${ ( props ) => props . $modaltyle . borderWidth } ;
807
- border-style: ${ ( props ) => props . $modaltyle . borderStyle } ;
808
- color: ${ ( props ) => props . $modaltyle . text } ;
792
+ background-color: ${ ( props ) => props . $modalStyle . labelBackground } ;
793
+ border-color: ${ ( props ) => props . $modalStyle . border } ;
794
+ border-width: ${ ( props ) => props . $modalStyle . borderWidth } ;
795
+ border-style: ${ ( props ) => props . $modalStyle . borderStyle } ;
796
+ color: ${ ( props ) => props . $modalStyle . text } ;
809
797
}
810
798
811
799
` ;
@@ -953,19 +941,25 @@ export const defaultData = [
953
941
start : dayjs ( ) . hour ( 10 ) . minute ( 0 ) . second ( 0 ) . format ( DATE_TIME_FORMAT ) ,
954
942
end : dayjs ( ) . hour ( 12 ) . minute ( 30 ) . second ( 0 ) . format ( DATE_TIME_FORMAT ) ,
955
943
color : "#079968" ,
956
- backgroundColor :"purple " ,
944
+ backgroundColor :"#ffffff " ,
957
945
detail : 'Discuss project milestones and deliverables.' ,
958
- titleColor :"black" ,
959
- detailColor :"black" ,
946
+ titleColor :"#000000" ,
947
+ detailColor :"#000000" ,
948
+ titleFontWeight :"normal" ,
949
+ titleFontStyle :"italic" ,
950
+ detailFontWeight :"normal" ,
951
+ detailFontStyle :"italic" ,
952
+ animation :"none" ,
953
+ animationDelay :"0s" ,
954
+ animationDuration :"0s" ,
955
+ animationIterationCount :"0" ,
960
956
} ,
961
957
{
962
958
id : "2" ,
963
959
title : "Rest" ,
964
960
start : dayjs ( ) . hour ( 24 ) . format ( DATE_FORMAT ) ,
965
961
end : dayjs ( ) . hour ( 48 ) . format ( DATE_FORMAT ) ,
966
- backgroundColor :"purple" ,
967
962
color : "#079968" ,
968
- titleColor :"white" ,
969
963
allDay : true ,
970
964
} ,
971
965
] ;
@@ -1114,3 +1108,4 @@ export const viewClassNames = (info: ViewContentArg) => {
1114
1108
}
1115
1109
return className ;
1116
1110
} ;
1111
+
0 commit comments