@@ -654,24 +654,12 @@ export const Remove = styled.div<{ $isList: boolean }>`
654654` ;
655655
656656export const Event = styled . div < {
657- $bg : string ;
658657 theme : Object ;
659658 $isList : boolean ;
660659 $allDay : boolean ;
661660 $style : CalendarStyleType ;
662661 $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 ;
675663} > `
676664 height: 100%;
677665 width: 100%;
@@ -680,17 +668,17 @@ export const Event = styled.div<{
680668 box-shadow: ${ ( props ) => ! props . $isList && "0 0 5px 0 rgba(0, 0, 0, 0.15)" } ;
681669 border: 1px solid ${ ( props ) => props . $style . border } ;
682670 display: ${ ( props ) => props . $isList && "flex" } ;
683- background-color:${ ( props ) => props . $backgroundColor } ;
671+ background-color:${ ( props ) => props ? .$backgroundColor || "#ffffff" } ;
684672 overflow: hidden;
685673 font-size: 13px;
686674 line-height: 19px;
687675 padding-right: 20px;
688676 overflow: hidden;
689677 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 || "" } ;
694682 &::before {
695683 content: "";
696684 position: absolute;
@@ -700,7 +688,7 @@ export const Event = styled.div<{
700688 left: 2px;
701689 top: 2px;
702690 border-radius: 3px;
703- background-color: ${ ( props ) => props . $bg } ;
691+ background-color: ${ ( props ) => props . $extendedProps ?. color } ;
704692 }
705693
706694 .event-time {
@@ -714,17 +702,17 @@ export const Event = styled.div<{
714702 margin-top: 2px;
715703 }
716704 .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 || "" } ;
720708 margin-left: 15px;
721709 white-space: pre-wrap;
722710 word-break: break-word;
723711 }
724712 .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" } ;
728716 margin-left: 15px;
729717 white-space: pre-wrap;
730718 word-break: break-word;
@@ -762,9 +750,9 @@ export const Event = styled.div<{
762750 }
763751 &.past {
764752 background-color: ${ ( props ) =>
765- `rgba(${ props . $style . bg } , 0.3)` } ;
753+ `rgba(${ props ?. $extendedProps ?. color } , 0.3)` } ;
766754 &::before {
767- background-color: ${ ( props ) => props . $style . bg } ;
755+ background-color: ${ ( props ) => props ?. $extendedProps ?. color } ;
768756 opacity: 0.3;
769757 }
770758 &::before,
@@ -780,10 +768,10 @@ export const Event = styled.div<{
780768
781769
782770export const FormWrapper = styled ( Form ) < {
783- $modaltyle : EventModalStyleType
771+ $modalStyle : EventModalStyleType
784772} > `
785773 .ant-form-item-label {
786- width: 120px ;
774+ width: 125px ;
787775 text-align: left;
788776 line-height: 18px;
789777
@@ -801,11 +789,11 @@ export const FormWrapper = styled(Form)<{
801789
802790 // Setting style for input fields
803791 .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 } ;
809797 }
810798
811799` ;
@@ -953,19 +941,25 @@ export const defaultData = [
953941 start : dayjs ( ) . hour ( 10 ) . minute ( 0 ) . second ( 0 ) . format ( DATE_TIME_FORMAT ) ,
954942 end : dayjs ( ) . hour ( 12 ) . minute ( 30 ) . second ( 0 ) . format ( DATE_TIME_FORMAT ) ,
955943 color : "#079968" ,
956- backgroundColor :"purple " ,
944+ backgroundColor :"#ffffff " ,
957945 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" ,
960956 } ,
961957 {
962958 id : "2" ,
963959 title : "Rest" ,
964960 start : dayjs ( ) . hour ( 24 ) . format ( DATE_FORMAT ) ,
965961 end : dayjs ( ) . hour ( 48 ) . format ( DATE_FORMAT ) ,
966- backgroundColor :"purple" ,
967962 color : "#079968" ,
968- titleColor :"white" ,
969963 allDay : true ,
970964 } ,
971965] ;
@@ -1114,3 +1108,4 @@ export const viewClassNames = (info: ViewContentArg) => {
11141108 }
11151109 return className ;
11161110} ;
1111+
0 commit comments