Skip to content

Commit d905ccb

Browse files
Merge pull request #910 from MenamAfzal/fix/type
added type for buttonStyle
2 parents 5fed3c7 + a52627f commit d905ccb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

client/packages/lowcoder/src/comps/comps/buttonComp/buttonCompConstants.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { genActiveColor, genHoverColor } from "lowcoder-design";
77
import { refMethods } from "comps/generators/withMethodExposing";
88
import { blurMethod, clickMethod, focusWithOptions } from "comps/utils/methodUtils";
99

10-
export function getButtonStyle(buttonStyle: any) {
10+
export function getButtonStyle(buttonStyle: ButtonStyleType) {
1111
const hoverColor = genHoverColor(buttonStyle.background);
1212
const activeColor = genActiveColor(buttonStyle.background);
1313
return css`
@@ -52,7 +52,7 @@ export function getButtonStyle(buttonStyle: any) {
5252
`;
5353
}
5454

55-
export const Button100 = styled(Button)<{ $buttonStyle?: any }>`
55+
export const Button100 = styled(Button)<{ $buttonStyle?: ButtonStyleType }>`
5656
${(props) => props.$buttonStyle && getButtonStyle(props.$buttonStyle)}
5757
width: 100%;
5858
height: auto;

client/packages/lowcoder/src/comps/comps/buttonComp/dropdownComp.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { default as Dropdown } from "antd/es/dropdown";
33
import { default as DropdownButton } from "antd/es/dropdown/dropdown-button";
44
import { BoolControl } from "comps/controls/boolControl";
55
import { BoolCodeControl, StringControl } from "comps/controls/codeControl";
6-
import { DropdownStyle } from "comps/controls/styleControlConstants";
6+
import { DropdownStyle, DropdownStyleType } from "comps/controls/styleControlConstants";
77
import { withDefault } from "comps/generators";
88
import { UICompBuilder } from "comps/generators/uiCompBuilder";
99
import { disabledPropertyView, hiddenPropertyView } from "comps/utils/propertyUtils";
@@ -33,7 +33,7 @@ const StyledDropdownButton = styled(DropdownButton)`
3333
}
3434
`;
3535

36-
const LeftButtonWrapper = styled.div<{ $buttonStyle: any }>`
36+
const LeftButtonWrapper = styled.div<{ $buttonStyle: DropdownStyleType }>`
3737
width: calc(100%);
3838
${(props) => `margin: ${props.$buttonStyle.margin};`}
3939
margin-right: 0;
@@ -63,7 +63,7 @@ const LeftButtonWrapper = styled.div<{ $buttonStyle: any }>`
6363
6464
`;
6565

66-
const RightButtonWrapper = styled.div<{ $buttonStyle: any }>`
66+
const RightButtonWrapper = styled.div<{ $buttonStyle: DropdownStyleType }>`
6767
// width: 32px;
6868
${(props) => `margin: ${props.$buttonStyle.margin};`}
6969
margin-left: -1px;

0 commit comments

Comments
 (0)