Skip to content

added type for buttonStyle #910

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
added type for buttonStyle
  • Loading branch information
MenamAfzaal committed May 27, 2024
commit a65755fffcd8fb3a23f80a5cb0a7ed03968f4fc4
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { genActiveColor, genHoverColor } from "lowcoder-design";
import { refMethods } from "comps/generators/withMethodExposing";
import { blurMethod, clickMethod, focusWithOptions } from "comps/utils/methodUtils";

export function getButtonStyle(buttonStyle: any) {
export function getButtonStyle(buttonStyle: ButtonStyleType) {
const hoverColor = genHoverColor(buttonStyle.background);
const activeColor = genActiveColor(buttonStyle.background);
return css`
Expand Down Expand Up @@ -52,7 +52,7 @@ export function getButtonStyle(buttonStyle: any) {
`;
}

export const Button100 = styled(Button)<{ $buttonStyle?: any }>`
export const Button100 = styled(Button)<{ $buttonStyle?: ButtonStyleType }>`
${(props) => props.$buttonStyle && getButtonStyle(props.$buttonStyle)}
width: 100%;
height: auto;
Expand Down
Loading