File tree Expand file tree Collapse file tree 2 files changed +26
-3
lines changed
client/packages/lowcoder/src/comps/comps Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,24 @@ import Table from "antd/es/table";
77import { ReactNode , useMemo , memo , useCallback } from "react" ;
88import Tooltip from "antd/es/tooltip" ;
99
10+ const CellContainer = styled . div < {
11+ $textAlign ?: 'left' | 'center' | 'right' ;
12+ } > `
13+ display: flex;
14+ justify-content: ${ ( props ) => {
15+ switch ( props . $textAlign ) {
16+ case 'left' :
17+ return 'flex-start' ;
18+ case 'center' :
19+ return 'center' ;
20+ case 'right' :
21+ return 'flex-end' ;
22+ default :
23+ return 'flex-start' ;
24+ }
25+ } } ;
26+ ` ;
27+
1028const TableSummaryRow = styled ( Table . Summary . Row ) < {
1129 $istoolbarPositionBelow : boolean ;
1230 $background : string ;
@@ -170,7 +188,9 @@ const TableSummaryCellView = memo(function TableSummaryCellView(props: {
170188 $autoHeight = { autoHeight }
171189 >
172190 < CellWrapper tooltipTitle = { cellTooltip } >
173- < div > { children } </ div >
191+ < CellContainer $textAlign = { restProps . align } >
192+ { children }
193+ </ CellContainer >
174194 </ CellWrapper >
175195 </ TableSummarCell >
176196 ) ;
Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ const getStyle = (style: TextStyleType) => {
3737 text-transform : ${ style . textTransform } !important ;
3838 text-decoration : ${ style . textDecoration } !important ;
3939 background : ${ style . background } ;
40+ line-height : ${ style . lineHeight } ;
41+ margin : ${ style . margin } !important ;
42+ padding : ${ style . padding } ;
4043 .markdown-body a {
4144 color : ${ style . links } ;
4245 }
@@ -68,7 +71,7 @@ const getStyle = (style: TextStyleType) => {
6871 h6 {
6972 color : ${ style . text } ;
7073 font-weight : ${ style . textWeight } !important ;
71- line-height : ${ style . lineHeight } ;
74+ line-height : ${ style . lineHeight } !important ;
7275 }
7376 img ,
7477 pre {
@@ -101,9 +104,9 @@ const TextContainer = React.memo(styled.div<{
101104 margin: ${ props . $styleConfig . margin } ;
102105 padding: ${ props . $styleConfig . padding } ;
103106 ` } ;
104- ${ ( props ) => props . $styleConfig && getStyle ( props . $styleConfig ) }
105107 display: flex;
106108 ${ markdownCompCss } ;
109+ ${ ( props ) => props . $styleConfig && getStyle ( props . $styleConfig ) }
107110 overflow-wrap: anywhere;
108111 .markdown-body {
109112 overflow-wrap: anywhere;
You can’t perform that action at this time.
0 commit comments