Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ import Table from "antd/es/table";
import { ReactNode, useMemo, memo, useCallback } from "react";
import Tooltip from "antd/es/tooltip";

const CellContainer = styled.div<{
$textAlign?: 'left' | 'center' | 'right';
}>`
display: flex;
justify-content: ${(props) => {
switch (props.$textAlign) {
case 'left':
return 'flex-start';
case 'center':
return 'center';
case 'right':
return 'flex-end';
default:
return 'flex-start';
}
}};
`;

const TableSummaryRow = styled(Table.Summary.Row)<{
$istoolbarPositionBelow: boolean;
$background: string;
Expand Down Expand Up @@ -170,7 +188,9 @@ const TableSummaryCellView = memo(function TableSummaryCellView(props: {
$autoHeight={autoHeight}
>
<CellWrapper tooltipTitle={cellTooltip}>
<div>{children}</div>
<CellContainer $textAlign={restProps.align}>
{children}
</CellContainer>
</CellWrapper>
</TableSummarCell>
);
Expand Down
7 changes: 5 additions & 2 deletions client/packages/lowcoder/src/comps/comps/textComp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ const getStyle = (style: TextStyleType) => {
text-transform:${style.textTransform} !important;
text-decoration:${style.textDecoration} !important;
background: ${style.background};
line-height: ${style.lineHeight};
margin: ${style.margin} !important;
padding: ${style.padding};
.markdown-body a {
color: ${style.links};
}
Expand Down Expand Up @@ -68,7 +71,7 @@ const getStyle = (style: TextStyleType) => {
h6 {
color: ${style.text};
font-weight: ${style.textWeight} !important;
line-height:${style.lineHeight};
line-height: ${style.lineHeight} !important;
}
img,
pre {
Expand Down Expand Up @@ -101,9 +104,9 @@ const TextContainer = React.memo(styled.div<{
margin: ${props.$styleConfig.margin};
padding: ${props.$styleConfig.padding};
`};
${(props) => props.$styleConfig && getStyle(props.$styleConfig)}
display: flex;
${markdownCompCss};
${(props) => props.$styleConfig && getStyle(props.$styleConfig)}
overflow-wrap: anywhere;
.markdown-body {
overflow-wrap: anywhere;
Expand Down
Loading