Skip to content

Commit 067ded9

Browse files
author
FalkWolsky
committed
Style Icons
1 parent 8ee1306 commit 067ded9

File tree

3 files changed

+22
-21
lines changed

3 files changed

+22
-21
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,4 @@ const ColorBlock = styled.div<{ $color: string }>`
178178
cursor: pointer;
179179
background-clip: content-box;
180180
overflow: hidden;
181-
`;
181+
`;

client/packages/lowcoder/src/components/ColorPicker.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export default function ColorPicker(props: ColorConfigProps) {
197197
)}
198198
{colorKey === "margin" && (
199199
<div className="config-input">
200-
<Margin $margin={defaultMargin || "3px"}>
200+
<Margin $margin={defaultMargin || "4px"}>
201201
<div>
202202
<ExpandIcon title="" />
203203
</div>
@@ -215,7 +215,7 @@ export default function ColorPicker(props: ColorConfigProps) {
215215
)}
216216
{colorKey === "padding" && (
217217
<div className="config-input">
218-
<Padding $padding={defaultPadding || "3px"}>
218+
<Padding $padding={defaultPadding || "4px"}>
219219
<div>
220220
<CompressIcon title="" />
221221
</div>

client/packages/lowcoder/src/comps/controls/styleControl.tsx

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import {
1313
ExpandIcon,
1414
CompressIcon,
1515
TextSizeIcon,
16+
PencilIcon,
17+
ShowBorderIcon,
1618
} from "lowcoder-design";
1719
import { useContext } from "react";
1820
import styled from "styled-components";
@@ -250,19 +252,11 @@ const StyleContent = styled.div`
250252
}
251253
`;
252254

253-
const RadiusIcon = styled(IconRadius)`
254-
margin: 0 8px 0 -2px;
255-
`;
256-
257-
const MarginIcon = styled(ExpandIcon)`
258-
margin: 0 8px 0 -2px;
259-
`;
260-
const PaddingIcon = styled(CompressIcon)`
261-
margin: 0 8px 0 -2px;
262-
`;
263-
const StyledTextSizeIcon = styled(TextSizeIcon)`
264-
margin: 0 8px 0 -2px;
265-
`;
255+
const RadiusIcon = styled(IconRadius)` margin: 0 8px 0 -2px;`;
256+
const BorderIcon = styled(ShowBorderIcon)` margin: 0px 10px 0 3px;`;
257+
const MarginIcon = styled(ExpandIcon)` margin: 0 8px 0 2px;`;
258+
const PaddingIcon = styled(CompressIcon)` margin: 0 8px 0 2px;`;
259+
const StyledTextSizeIcon = styled(TextSizeIcon)` margin: 0 8px 0 0px;`;
266260
const ResetIcon = styled(IconReset)`
267261
&:hover g g {
268262
stroke: #315efb;
@@ -366,22 +360,29 @@ export function styleControl<T extends readonly SingleColorConfig[]>(colorConfig
366360
{ filterText: config.label },
367361
<div key={index}>
368362
{(name === "radius" ||
369-
name === "borderWidth" ||
370363
name === "gap" ||
371364
name === "cardRadius")
372365
? (
373366
children[name] as InstanceType<typeof StringControl>
374367
).propertyView({
375368
label: config.label,
376-
preInputNode: <RadiusIcon title="" />,
369+
preInputNode: <RadiusIcon title="Radius" />,
377370
placeholder: props[name],
378-
})
371+
})
372+
: name === "borderWidth"
373+
? (
374+
children[name] as InstanceType<typeof StringControl>
375+
).propertyView({
376+
label: config.label,
377+
preInputNode: <BorderIcon title="Border-Width" />,
378+
placeholder: props[name],
379+
})
379380
: name === "margin"
380381
? (
381382
children[name] as InstanceType<typeof StringControl>
382383
).propertyView({
383384
label: config.label,
384-
preInputNode: <MarginIcon title="" />,
385+
preInputNode: <MarginIcon title="Margin" />,
385386
placeholder: props[name],
386387
})
387388
: (name === "padding" ||
@@ -392,7 +393,7 @@ export function styleControl<T extends readonly SingleColorConfig[]>(colorConfig
392393
children[name] as InstanceType<typeof StringControl>
393394
).propertyView({
394395
label: config.label,
395-
preInputNode: <PaddingIcon title="" />,
396+
preInputNode: <PaddingIcon title="Padding" />,
396397
placeholder: props[name],
397398
})
398399
: name === "textSize"

0 commit comments

Comments
 (0)