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

Commit 5665218

Browse files
freddysundownerraheeliftikhar5
authored andcommitted
added grid too shapes comp and lables to shapes lists
1 parent bcd1211 commit 5665218

File tree

2 files changed

+25
-15
lines changed

2 files changed

+25
-15
lines changed

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

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ const StyledSearchIcon = styled(SearchIcon)`
7474
const IconListWrapper = styled.div`
7575
padding-left: 10px;
7676
padding-right: 4px;
77+
.gtujLP {
78+
overflow: hidden;
79+
}
80+
.iconsDiv div {
81+
float: left;
82+
}
7783
`;
7884
const IconList = styled(List)`
7985
scrollbar-gutter: stable;
@@ -278,14 +284,10 @@ function getIconKey(value?: string) {
278284
}
279285

280286
export function useShape(value?: string) {
281-
console.log("icon value ", value);
282287
const key = getIconKey(value);
283-
console.log("icon key ", key);
284-
285288
const [icon, setIcon] = useState<Icon | undefined>(undefined);
286289
useEffect(() => {
287290
let allshapes = getAllIcons();
288-
console.log("all shapes ", allshapes);
289291
setIcon(allshapes[key]);
290292
}, [key]);
291293
return icon;
@@ -379,28 +381,36 @@ const IconPopup = (props: {
379381
<StyledCloseIcon onClick={props.onClose} />
380382
</TitleDiv>
381383
{/* <SearchDiv>
382-
<TacoInput
384+
<TacoInput
383385
style={{ width: "100%", paddingLeft: "40px" }}
384386
value={searchText}
385387
onChange={(e) => setSearchText(e.target.value)}
386388
placeholder={trans("shapeSelect.searchPlaceholder")}
387389
/>
388390
<StyledSearchIcon />
389391
</SearchDiv> */}
390-
<IconListWrapper>
392+
<IconListWrapperstyle={{display: "flex",flexWrap: "wrap"}}>
391393
<>
392394
{Object.keys(shapes).map((shapeType: string, _i: number) => {
393395
return shapes[shapeType as keyof typeof shapes].map(
394396
(Shape: any, index: any) => {
395397
return (
396-
<Shape
397-
size={48}
398+
<div
399+
style={{paddingLeft: "10px"}}
398400
key={index}
399401
onClick={() => {
400-
console.log("Shape ", index, shapeType);
401402
onChangeIcon(index + "_" + shapeType);
402403
}}
403-
/>
404+
>
405+
<Shape
406+
size={24}
407+
key={index}
408+
onClick={() => {
409+
onChangeIcon(index + "_" + shapeType);
410+
}}
411+
/>
412+
<p>{shapeType}</p>
413+
</div>
404414
);
405415
}
406416
);

‎client/yarn.lock‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7425,13 +7425,13 @@ __metadata:
74257425
languageName: node
74267426
linkType: hard
74277427

7428-
"coolshapes-react@npm:^0.1.1-beta.0":
7429-
version: 0.1.1-beta.0
7430-
resolution: "coolshapes-react@npm:0.1.1-beta.0"
7428+
"coolshapes-react@file:/Users/la/Desktop/coolshapes-react::locator=lowcoder%40workspace%3Apackages%2Flowcoder":
7429+
version: 1.0.1
7430+
resolution: "coolshapes-react@file:/Users/la/Desktop/coolshapes-react#/Users/la/Desktop/coolshapes-react::hash=163e05&locator=lowcoder%40workspace%3Apackages%2Flowcoder"
74317431
peerDependencies:
74327432
react: ">=16.8"
74337433
react-dom: ">=16.8"
7434-
checksum: c3edd7e43ef84f5c34faebc0d97316a2a4177c143d0eb23f9f62022a9fc19451a7d8f2af2730ae7852bba524bb08204ac22871fad2f85305072b048acbad7b78
7434+
checksum: 858b8476d410d3faae4cb26aab768d7a9d370befd51f54004540b84a08f27f5f11aa6ff4b76dca9f4dee82edfcd030d528819fabdbc82d2a6b0462b6f2d94ff3
74357435
languageName: node
74367436
linkType: hard
74377437

@@ -13675,7 +13675,7 @@ __metadata:
1367513675
buffer: ^6.0.3
1367613676
clsx: ^2.0.0
1367713677
cnchar: ^3.2.4
13678-
coolshapes-react: ^0.1.1-beta.0
13678+
coolshapes-react: /Users/la/Desktop/coolshapes-react
1367913679
copy-to-clipboard: ^3.3.3
1368013680
core-js: ^3.25.2
1368113681
dotenv: ^16.0.3

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /