@@ -10,7 +10,7 @@ import { UICompBuilder } from "../generators";
10
10
import { NameConfig , NameConfigHidden , withExposingConfigs } from "../generators/withExposing" ;
11
11
import { markdownCompCss , TacoMarkDown } from "lowcoder-design" ;
12
12
import { 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" ;
14
14
import { hiddenPropertyView } from "comps/utils/propertyUtils" ;
15
15
import { trans } from "i18n" ;
16
16
import { alignWithJustifyControl } from "comps/controls/alignControl" ;
@@ -21,23 +21,24 @@ import { PaddingControl } from "../controls/paddingControl";
21
21
import React , { useContext } from "react" ;
22
22
import { EditorContext } from "comps/editorState" ;
23
23
24
- const getStyle = ( style :TextContainerStyleType ) => {
24
+ const getStyle = ( style :TextStyleType ) => {
25
25
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 } ;
28
29
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 ;
31
32
background-color : ${ style . background } ;
32
33
.markdown-body a {
33
34
color : ${ style . links } ;
34
35
}
35
36
.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 ) } ;
39
40
font-family : ${ style . fontFamily } !important ;
40
- font-style : ${ style . fontStyle } !important ;
41
+ font-style : ${ style . fontStyle } !important ;
41
42
font-size : ${ style . textSize } !important ;
42
43
// height:${ heightCalculator ( style . margin ) } ;
43
44
h1 {
@@ -74,15 +75,15 @@ const getStyle = (style: TextContainerStyleType) => {
74
75
75
76
const TextContainer = styled . div < {
76
77
$type :string ;
77
- $styleConfig :TextContainerStyleType ;
78
- $animationStyle :AnimationStyleType ;
78
+ $styleConfig :TextStyleType ;
79
+ $animationStyle :AnimationStyleType ;
79
80
} > `
80
81
height: 100%;
81
82
overflow: auto;
82
83
margin: 0;
83
- ${ props => props . $animationStyle }
84
+ ${ ( props ) => props . $animationStyle }
84
85
${ ( 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;' } ;
86
87
${ ( props ) => props . $styleConfig && getStyle ( props . $styleConfig ) }
87
88
display: flex;
88
89
font-size: 13px;
@@ -123,14 +124,14 @@ let TextTmpComp = (function () {
123
124
124
125
const childrenMap = {
125
126
text :stringExposingStateControl (
126
- " text" ,
127
- trans ( " textShow.text" , { name :" {{currentUser.name}}" } )
127
+ ' text' ,
128
+ trans ( ' textShow.text' , { name :' {{currentUser.name}}' } )
128
129
) ,
129
130
autoHeight :AutoHeightControl ,
130
- type :dropdownControl ( typeOptions , " markdown" ) ,
131
+ type :dropdownControl ( typeOptions , ' markdown' ) ,
131
132
horizontalAlignment :alignWithJustifyControl ( ) ,
132
- verticalAlignment :dropdownControl ( VerticalAlignmentOptions , " center" ) ,
133
- style :styleControl ( TextContainerStyle ) ,
133
+ verticalAlignment :dropdownControl ( VerticalAlignmentOptions , ' center' ) ,
134
+ style :styleControl ( TextStyle ) ,
134
135
animationStyle :styleControl ( AnimationStyle ) ,
135
136
margin :MarginControl ,
136
137
padding :PaddingControl ,
@@ -146,6 +147,7 @@ let TextTmpComp = (function () {
146
147
justifyContent :props . horizontalAlignment ,
147
148
alignItems :props . autoHeight ?"center" :props . verticalAlignment ,
148
149
textAlign :props . horizontalAlignment ,
150
+ rotate :props . style . rotation
149
151
} }
150
152
>
151
153
{ props . type === "markdown" ?< TacoMarkDown > { value } </ TacoMarkDown > :value }