Skip to content

Commit 45835f4

Browse files
committed
box shadow improved
1 parent fd31266 commit 45835f4

File tree

6 files changed

+17
-9
lines changed

6 files changed

+17
-9
lines changed

client/packages/lowcoder/src/comps/comps/autoCompleteComp/autoCompleteComp.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
withExposingConfigs,
1717
} from "comps/generators/withExposing";
1818
import styled, { css } from "styled-components";
19-
import { UICompBuilder } from "../../generators";
19+
import { UICompBuilder, withDefault } from "../../generators";
2020
import { FormDataPropertyView } from "../formComp/formDataConstants";
2121
import { jsonControl } from "comps/controls/codeControl";
2222
import { dropdownControl } from "comps/controls/dropdownControl";
@@ -58,7 +58,8 @@ import {
5858

5959

6060

61-
const InputStyle = styled(Input)<{ $style: InputLikeStyleType }>`
61+
const InputStyle = styled(Input) <{ $style: InputLikeStyleType }>`
62+
box-shadow: ${props=>`${props.$style?.boxShadow} ${props.$style?.boxShadowColor}`};
6263
${(props) => css`
6364
${getStyle(props.$style)}
6465
input {
@@ -75,7 +76,7 @@ const childrenMap = {
7576
...textInputChildren,
7677
viewRef: RefControl<InputRef>,
7778
allowClear: BoolControl.DEFAULT_TRUE,
78-
style: styleControl(InputFieldStyle),
79+
style: withDefault(styleControl(InputFieldStyle),{background:'transparent'}),
7980
labelStyle:styleControl(LabelStyle),
8081
prefixIcon: IconControl,
8182
suffixIcon: IconControl,
@@ -89,7 +90,7 @@ const childrenMap = {
8990
autocompleteIconColor: dropdownControl(autocompleteIconColor, "blue"),
9091
componentSize: dropdownControl(componentSize, "small"),
9192
valueInItems: booleanExposingStateControl("valueInItems"),
92-
inputFieldStyle: styleControl(InputLikeStyle),
93+
inputFieldStyle: withDefault(styleControl(InputLikeStyle),{borderWidth:'1px'}),
9394
animationStyle: styleControl(AnimationStyle),
9495
};
9596

client/packages/lowcoder/src/comps/comps/numberInputComp/numberInputComp.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,11 @@ const getStyle = (style: InputLikeStyleType) => {
119119
`;
120120
};
121121

122-
const InputNumber = styled(AntdInputNumber) <{
122+
const InputNumber = styled(AntdInputNumber)<{
123123
$style: InputLikeStyleType;
124124
}>`
125+
box-shadow: ${(props) =>
126+
`${props.$style?.boxShadow} ${props.$style?.boxShadowColor}`};
125127
width: 100%;
126128
${(props) => props.$style && getStyle(props.$style)}
127129
`;

client/packages/lowcoder/src/comps/comps/textInputComp/inputComp.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ import { EditorContext } from "comps/editorState";
4040
* Input Comp
4141
*/
4242

43-
const InputStyle = styled(Input) <{ $style: InputLikeStyleType }>`
43+
const InputStyle = styled(Input)<{$style: InputLikeStyleType}>`
44+
box-shadow: ${(props) =>
45+
`${props.$style?.boxShadow} ${props.$style?.boxShadowColor}`};
4446
${(props) => props.$style && getStyle(props.$style)}
4547
`;
4648

client/packages/lowcoder/src/comps/comps/textInputComp/passwordComp.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ import React, { useContext } from "react";
4343
import { EditorContext } from "comps/editorState";
4444
import { migrateOldData } from "comps/generators/simpleGenerators";
4545

46-
const PasswordStyle = styled(InputPassword) <{
46+
const PasswordStyle = styled(InputPassword)<{
4747
$style: InputLikeStyleType;
4848
}>`
49+
box-shadow: ${(props) =>
50+
`${props.$style?.boxShadow} ${props.$style?.boxShadowColor}`};
4951
${(props) => props.$style && getStyle(props.$style)}
5052
`;
5153

client/packages/lowcoder/src/comps/comps/textInputComp/textAreaComp.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ import React, { useContext } from "react";
3838
import { EditorContext } from "comps/editorState";
3939
import { migrateOldData } from "comps/generators/simpleGenerators";
4040

41-
const TextAreaStyled = styled(TextArea) <{
41+
const TextAreaStyled = styled(TextArea)<{
4242
$style: InputLikeStyleType;
4343
}>`
44+
box-shadow: ${(props) =>
45+
`${props.$style?.boxShadow} ${props.$style?.boxShadowColor}`};
4446
${(props) => props.$style && getStyle(props.$style)}
4547
`;
4648

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ export const LabelControl = (function () {
231231
: "100%",
232232
height: props.position === "column" && !!props.text ? "calc(100% - 22px)" : "100%",
233233
rotate:args?.inputFieldStyle?.rotation,
234-
boxShadow:`${args?.inputFieldStyle?.boxShadow} ${args?.inputFieldStyle?.boxShadowColor}`
235234
}}
236235
>
237236
{args.children}

0 commit comments

Comments
 (0)