@@ -10,7 +10,7 @@ import { UICompBuilder } from "../generators";
1010import { NameConfig , NameConfigHidden , withExposingConfigs } from "../generators/withExposing" ;
1111import { markdownCompCss , TacoMarkDown } from "lowcoder-design" ;
1212import { styleControl } from "comps/controls/styleControl" ;
13- import { AnimationStyle , AnimationStyleType , TextContainerStyle , TextContainerStyleType , heightCalculator , widthCalculator } from "comps/controls/styleControlConstants" ;
13+ import { AnimationStyle , AnimationStyleType , TextStyle , TextStyleType , heightCalculator , widthCalculator } from "comps/controls/styleControlConstants" ;
1414import { hiddenPropertyView } from "comps/utils/propertyUtils" ;
1515import { trans } from "i18n" ;
1616import { alignWithJustifyControl } from "comps/controls/alignControl" ;
@@ -21,23 +21,24 @@ import { PaddingControl } from "../controls/paddingControl";
2121import React , { useContext } from "react" ;
2222import { EditorContext } from "comps/editorState" ;
2323
24- const getStyle = ( style : TextContainerStyleType ) => {
24+ const getStyle = ( style : TextStyleType ) => {
2525 return css `
26- border-radius : ${ ( style . radius ? style . radius : "4px" ) } ;
27- border : ${ ( style . borderWidth ? style . borderWidth : "0px" ) } solid ${ style . border } ;
26+ border-radius : ${ style . radius ? style . radius : '4px' } ;
27+ border : ${ style . borderWidth ? style . borderWidth : '0px' } solid
28+ ${ style . border } ;
2829 color : ${ style . text } ;
29- text-transform : ${ style . textTransform } !important ;
30- text-decoration : ${ style . textDecoration } !important ;
30+ text-transform : ${ style . textTransform } !important ;
31+ text-decoration : ${ style . textDecoration } !important ;
3132 background-color : ${ style . background } ;
3233 .markdown-body a {
3334 color : ${ style . links } ;
3435 }
3536 .markdown-body {
36- margin : ${ style . margin } !important ;
37- padding : ${ style . padding } ;
38- width : ${ widthCalculator ( style . margin ) } ;
37+ margin : ${ style . margin } !important ;
38+ padding : ${ style . padding } ;
39+ width : ${ widthCalculator ( style . margin ) } ;
3940 font-family : ${ style . fontFamily } !important ;
40- font-style : ${ style . fontStyle } !important ;
41+ font-style : ${ style . fontStyle } !important ;
4142 font-size : ${ style . textSize } !important ;
4243 // height: ${ heightCalculator ( style . margin ) } ;
4344 h1 {
@@ -74,15 +75,15 @@ const getStyle = (style: TextContainerStyleType) => {
7475
7576const TextContainer = styled . div < {
7677 $type : string ;
77- $styleConfig : TextContainerStyleType ;
78- $animationStyle :AnimationStyleType ;
78+ $styleConfig : TextStyleType ;
79+ $animationStyle : AnimationStyleType ;
7980} > `
8081 height: 100%;
8182 overflow: auto;
8283 margin: 0;
83- ${ props => props . $animationStyle }
84+ ${ ( props ) => props . $animationStyle }
8485 ${ ( props ) =>
85- props . $type === " text" && " white-space:break-spaces;line-height: 1.9;" } ;
86+ props . $type === ' text' && ' white-space:break-spaces;line-height: 1.9;' } ;
8687 ${ ( props ) => props . $styleConfig && getStyle ( props . $styleConfig ) }
8788 display: flex;
8889 font-size: 13px;
@@ -123,14 +124,14 @@ let TextTmpComp = (function () {
123124
124125 const childrenMap = {
125126 text : stringExposingStateControl (
126- " text" ,
127- trans ( " textShow.text" , { name : " {{currentUser.name}}" } )
127+ ' text' ,
128+ trans ( ' textShow.text' , { name : ' {{currentUser.name}}' } )
128129 ) ,
129130 autoHeight : AutoHeightControl ,
130- type : dropdownControl ( typeOptions , " markdown" ) ,
131+ type : dropdownControl ( typeOptions , ' markdown' ) ,
131132 horizontalAlignment : alignWithJustifyControl ( ) ,
132- verticalAlignment : dropdownControl ( VerticalAlignmentOptions , " center" ) ,
133- style : styleControl ( TextContainerStyle ) ,
133+ verticalAlignment : dropdownControl ( VerticalAlignmentOptions , ' center' ) ,
134+ style : styleControl ( TextStyle ) ,
134135 animationStyle : styleControl ( AnimationStyle ) ,
135136 margin : MarginControl ,
136137 padding : PaddingControl ,
@@ -146,6 +147,7 @@ let TextTmpComp = (function () {
146147 justifyContent : props . horizontalAlignment ,
147148 alignItems : props . autoHeight ? "center" : props . verticalAlignment ,
148149 textAlign : props . horizontalAlignment ,
150+ rotate : props . style . rotation
149151 } }
150152 >
151153 { props . type === "markdown" ? < TacoMarkDown > { value } </ TacoMarkDown > : value }
0 commit comments