Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbe17830

Browse files
Merge pull request#1896 from kamalqureshi/text_component_styling
Updated editable styling for Text comp
2 parentsc4c8640 +ee2c4f2 commitbe17830

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

‎client/packages/lowcoder/src/comps/comps/tableComp/tableSummaryComp.tsx‎

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ import Table from "antd/es/table";
77
import{ReactNode,useMemo,memo,useCallback}from"react";
88
importTooltipfrom"antd/es/tooltip";
99

10+
constCellContainer=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+
1028
constTableSummaryRow=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
<CellWrappertooltipTitle={cellTooltip}>
173-
<div>{children}</div>
191+
<CellContainer$textAlign={restProps.align}>
192+
{children}
193+
</CellContainer>
174194
</CellWrapper>
175195
</TableSummarCell>
176196
);

‎client/packages/lowcoder/src/comps/comps/textComp.tsx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff 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-bodya {
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;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp