Skip to content

Commit bc86b04

Browse files
committed
processed icons with MultiIcon passed object
1 parent b9f85cd commit bc86b04

File tree

120 files changed

+1360
-903
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+1360
-903
lines changed

client/packages/lowcoder-design/src/components/CustomModal.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { DarkActiveTextColor, GreyTextColor } from "constants/style";
99
import { trans } from "i18n/design";
1010
import { modalInstance } from "components/GlobalInstances";
1111
import {MultiIconDisplay} from "lowcoder/src/comps/comps/multiIconDisplay";
12+
import {CloseIcon, ErrorIcon, SuccessIcon, WarningIcon, WarningWhiteIcon} from "../icons";
1213

1314
type ModalWrapperProps = {
1415
$width?: string | number;
@@ -130,7 +131,7 @@ function ModalHeader(props: {
130131
)}
131132
<ModalHeaderTitle>{props.title}</ModalHeaderTitle>
132133
<ModalCloseIcon onClick={props.onCancel}>
133-
<MultiIconDisplay identifier="/icon:svg/CloseIcon" />
134+
<MultiIconDisplay identifier={CloseIcon} />
134135
</ModalCloseIcon>
135136
</>
136137
);
@@ -264,10 +265,10 @@ function CustomModal(props: CustomModalProps) {
264265
}
265266

266267
const TitleIcon = {
267-
error: <MultiIconDisplay identifier="/icon:svg/ErrorIcon" />,
268-
warn: <MultiIconDisplay identifier="/icon:svg/WarningIcon" />,
269-
info: <MultiIconDisplay identifier="/icon:svg/WarningWhiteIcon" />,
270-
success: <MultiIconDisplay identifier="/icon:svg/SuccessIcon" />,
268+
error: <MultiIconDisplay identifier={ErrorIcon} />,
269+
warn: <MultiIconDisplay identifier={WarningIcon} />,
270+
info: <MultiIconDisplay identifier={WarningWhiteIcon} />,
271+
success: <MultiIconDisplay identifier={SuccessIcon} />,
271272
};
272273

273274
CustomModal.confirm = (props: {

client/packages/lowcoder-design/src/components/ExternalLink.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { ActiveTextColor, GreyTextColor } from "constants/style";
22
import styled from "styled-components";
33
import {MultiIcon} from "lowcoder/src/comps/comps/multiIconDisplay";
4+
import {DocIcon} from "../icons";
45

56
export const ExternalLink = styled.a`
67
font-size: 13px;
@@ -14,7 +15,7 @@ export const ExternalLink = styled.a`
1415
}
1516
`;
1617

17-
const StyledDocIcon = styled(MultiIcon("/icon:svg/DocIcon"))`
18+
const StyledDocIcon = styled(MultiIcon(DocIcon))`
1819
height: 12px;
1920
width: 12px;
2021
margin-right: 4px;

client/packages/lowcoder-design/src/components/MenuItem.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from "react";
22
import styled, { css } from "styled-components";
33
import { labelCss } from "./Label";
44
import {MultiIcon} from "lowcoder/src/comps/comps/multiIconDisplay";
5+
import {DragIcon, PencilIcon, PointIcon} from "../icons";
56

67
interface IItem {
78
$width?: number;
@@ -26,7 +27,7 @@ const IconCss = css`
2627
cursor: pointer;
2728
}
2829
`;
29-
const StyledDragIcon = styled(MultiIcon("/icon:svg/DragIcon"))`
30+
const StyledDragIcon = styled(MultiIcon(DragIcon))`
3031
${IconCss}
3132
margin-left: 12px;
3233
margin-top: 8px;
@@ -79,12 +80,12 @@ const GrayText = styled.span`
7980
color: #8b8fa3;
8081
margin-left: 8px;
8182
`;
82-
const StyledPencilIcon = styled(MultiIcon("/icon:svg/PencilIcon"))`
83+
const StyledPencilIcon = styled(MultiIcon(PencilIcon))`
8384
${IconCss}
8485
margin-top: 8px;
8586
float: right;
8687
`;
87-
const StyledPointIcon = styled(MultiIcon("/icon:svg/PointIcon"))`
88+
const StyledPointIcon = styled(MultiIcon(PointIcon))`
8889
${IconCss}
8990
margin-left: 16px;
9091
margin-top: 8px;

client/packages/lowcoder-design/src/components/eventHandler.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { LinkButton } from "./button";
44
import { ReactNode } from "react";
55
import { trans } from "i18n/design";
66
import {MultiIcon, MultiIconDisplay} from "lowcoder/src/comps/comps/multiIconDisplay";
7+
import {BluePlusIcon} from "../icons";
78

89
const InlineEventFormWrapper = styled.div`
910
display: flex;
@@ -112,11 +113,11 @@ const AddLine = (props: { title: ReactNode; add: () => void }) => {
112113
return (
113114
<TitleDiv>
114115
<TitleSpan>{props.title}</TitleSpan>
115-
<LinkButton icon={<MultiIconDisplay identifier="/icon:svg/BluePlusIcon" />} text={trans("addItem")} onClick={props.add} />
116+
<LinkButton icon={<MultiIconDisplay identifier={BluePlusIcon} />} text={trans("addItem")} onClick={props.add} />
116117
</TitleDiv>
117118
);
118119
};
119-
const Blueplus = MultiIcon("/icon:svg/BluePlusIcon")
120+
const Blueplus = MultiIcon(BluePlusIcon)
120121
export {
121122
Blueplus as AddEventIcon,
122123
EventDiv,

client/packages/lowcoder-design/src/components/iconSelect/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { default as List, type ListRowProps } from "react-virtualized/dist/es/Li
2121
import styled from "styled-components";
2222
import { ANTDICON } from "icons/antIcon";
2323
import {MultiIcon} from "lowcoder/src/comps/comps/multiIconDisplay";
24+
import {CloseIcon, SearchIcon} from "../../icons";
2425

2526
const PopupContainer = styled.div`
2627
width: 580px;
@@ -42,7 +43,7 @@ const TitleText = styled.span`
4243
color: #222222;
4344
line-height: 16px;
4445
`;
45-
const StyledCloseIcon = styled(MultiIcon("/icon:svg/CloseIcon"))`
46+
const StyledCloseIcon = styled(MultiIcon(CloseIcon))`
4647
width: 16px;
4748
height: 16px;
4849
cursor: pointer;
@@ -60,7 +61,7 @@ const SearchDiv = styled.div`
6061
display: flex;
6162
justify-content: space-between;
6263
`;
63-
const StyledSearchIcon = styled(MultiIcon("/icon:svg/SearchIcon"))`
64+
const StyledSearchIcon = styled(MultiIcon(SearchIcon))`
6465
position: absolute;
6566
top: 6px;
6667
left: 12px;

client/packages/lowcoder-design/src/components/keyValueList.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { TacoButton } from "./button";
44
import { ReactNode } from "react";
55
import { trans } from "i18n/design";
66
import {MultiIcon} from "lowcoder/src/comps/comps/multiIconDisplay";
7+
import {BluePlusIcon} from "../icons";
78

89
const KeyValueListItem = styled.div`
910
display: flex;
@@ -33,7 +34,7 @@ const DelIcon = styled(Bin)<{
3334
}
3435
`;
3536

36-
const AddIcon = styled(MultiIcon("/icon:svg/BluePlusIcon"))`
37+
const AddIcon = styled(MultiIcon(BluePlusIcon))`
3738
height: 8px;
3839
width: 8px;
3940
margin-right: 4px;

client/packages/lowcoder-design/src/components/option.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { restrictToVerticalAxis } from "@dnd-kit/modifiers";
1313
import { ActiveTextColor, GreyTextColor } from "constants/style";
1414
import { trans } from "i18n/design";
1515
import {MultiIcon} from "lowcoder/src/comps/comps/multiIconDisplay";
16+
import {DragIcon, PointIcon} from "../icons";
1617

1718
const OptionDiv = styled.div`
1819
width: 100%;
@@ -103,7 +104,7 @@ const EmptyOptionSpan = styled.span`
103104
}
104105
`;
105106

106-
const StyledDragIcon = styled(MultiIcon("/icon:svg/DragIcon"))`
107+
const StyledDragIcon = styled(MultiIcon(DragIcon))`
107108
${IconCss};
108109
margin-top: 8px;
109110
margin-left: 8px;
@@ -120,7 +121,7 @@ const StyledDragIcon = styled(MultiIcon("/icon:svg/DragIcon"))`
120121
}
121122
`;
122123

123-
const StyledPointIcon = styled(MultiIcon("/icon:svg/PointIcon"))`
124+
const StyledPointIcon = styled(MultiIcon(PointIcon))`
124125
${IconCss};
125126
color: ${GreyTextColor};
126127

client/packages/lowcoder-design/src/components/popover.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import styled from "styled-components";
55
import { ActiveTextColor, GreyTextColor } from "constants/style";
66
import { trans } from "i18n/design";
77
import {MultiIcon} from "lowcoder/src/comps/comps/multiIconDisplay";
8+
import {PointIcon} from "../icons";
89

910
const Wedge = styled.div`
1011
height: 8px;
@@ -36,7 +37,7 @@ const Handle = styled.div`
3637
}
3738
`;
3839

39-
const StyledPointIcon = styled(MultiIcon("/icon:svg/PointIcon"))`
40+
const StyledPointIcon = styled(MultiIcon(PointIcon))`
4041
cursor: pointer;
4142
color: ${GreyTextColor};
4243

client/packages/lowcoder-design/src/components/popupCard.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { CopyTextButton } from "./copyTextButton";
44
import { CSSProperties, ReactNode, useState } from "react";
55
import styled from "styled-components";
66
import {MultiIconDisplay} from "lowcoder/src/comps/comps/multiIconDisplay";
7+
import {ErrorIcon, SuccessIcon} from "../icons";
78

89
const StyledCard = styled(Card)<{ $backcolor: string }>`
910
z-index: 3;
@@ -126,7 +127,7 @@ export function PopupCard(props: PopupCardProps) {
126127
message={props.title}
127128
type={props.hasError ? "error" : "success"}
128129
showIcon
129-
icon={props.hasError ? <MultiIconDisplay identifier="/icon:svg/ErrorIcon" /> : <MultiIconDisplay identifier="/icon:svg/SuccessIcon" />}
130+
icon={props.hasError ? <MultiIconDisplay identifier={ErrorIcon} /> : <MultiIconDisplay identifier={SuccessIcon} />}
130131
/>
131132
}
132133
extra={<CopyTextButton text={props.content ?? ""} />}

client/packages/lowcoder-design/src/components/shapeSelect/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import styled from "styled-components";
2727
import { ANTDICON } from "icons/antIcon";
2828
import { JSX } from "react/jsx-runtime";
2929
import {MultiIcon} from "lowcoder/src/comps/comps/multiIconDisplay";
30+
import {CloseIcon, SearchIcon} from "../../icons";
3031

3132
const PopupContainer = styled.div`
3233
width: 580px;
@@ -48,7 +49,7 @@ const TitleText = styled.span`
4849
color: #222222;
4950
line-height: 16px;
5051
`;
51-
const StyledCloseIcon = styled(MultiIcon("/icon:svg/CloseIcon"))`
52+
const StyledCloseIcon = styled(MultiIcon(CloseIcon))`
5253
width: 16px;
5354
height: 16px;
5455
cursor: pointer;
@@ -66,7 +67,7 @@ const SearchDiv = styled.div`
6667
display: flex;
6768
justify-content: space-between;
6869
`;
69-
const StyledSearchIcon = styled(MultiIcon("/icon:svg/SearchIcon"))`
70+
const StyledSearchIcon = styled(MultiIcon(SearchIcon))`
7071
position: absolute;
7172
top: 6px;
7273
left: 12px;

client/packages/lowcoder-design/src/components/tacoPagination.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { default as Pagination, PaginationProps } from "antd/es/pagination";
22
import styled, { css } from "styled-components";
33
import { ReactComponent as PackUpIcon } from "icons/v1/icon-Pack-up.svg";
4-
import {MultiIconDisplay} from "lowcoder/src/comps/comps/multiIconDisplay";
54

65
const packUpIconCss = css`
76
height: 24px;
@@ -90,10 +89,10 @@ const StyledPagination = styled(Pagination)`
9089

9190
export const pageItemRender: PaginationProps["itemRender"] = (_, type, originalElement) => {
9291
if (type === "prev") {
93-
return <MultiIconDisplay identifier="/icon:svg/PrevIcon" />;
92+
return <PrevIcon />;
9493
}
9594
if (type === "next") {
96-
return <MultiIconDisplay identifier="/icon:svg/NextIcon" />;
95+
return <NextIcon />;
9796
}
9897
return originalElement;
9998
};

client/packages/lowcoder-design/src/components/video.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { lazy } from 'react';
33
import styled from "styled-components";
44
import {MultiIcon} from "lowcoder/src/comps/comps/multiIconDisplay";
5+
import { VideoCompIcon } from "icons";
56

67
const ReactPlayer = lazy(() => import("react-player"));
78

@@ -28,7 +29,7 @@ export const Container = styled.div`
2829
}
2930
}
3031
`;
31-
const PlayTriangle = styled(MultiIcon("/icon:svg/VideoCompIcon"))`
32+
const PlayTriangle = styled(MultiIcon(VideoCompIcon))`
3233
position: absolute;
3334
left: 0;
3435
top: 0;

0 commit comments

Comments
 (0)