Skip to content

Doc/existing components #1435

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 5 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
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
Prev Previous commit
Next Next commit
fixed iconButton comp
  • Loading branch information
raheeliftikhar5 committed Jan 1, 2025
commit 405537d83e392866984a507cc25ffd71bbb40f9c
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
import { styleControl } from "@lowcoder-ee/comps/controls/styleControl";
import { ButtonStyle } from "@lowcoder-ee/comps/controls/styleControlConstants";
import { migrateOldData } from "@lowcoder-ee/comps/generators/simpleGenerators";
import { refMethods } from "@lowcoder-ee/comps/generators/withMethodExposing";
import { blurMethod, clickMethod, focusWithOptions } from "@lowcoder-ee/comps/utils/methodUtils";
import { default as Button } from "antd/es/button";
import {
styleControl,
ButtonStyleType,
ButtonStyle,
migrateOldData,
refMethods,
blurMethod,
clickMethod,
focusWithOptions,
genActiveColor,
genHoverColor,
} from "lowcoder-sdk";
import { genActiveColor, genHoverColor } from "components/colorSelect/colorUtils";
import styled, { css } from "styled-components";
// import { genActiveColor, genHoverColor } from "lowcoder-design";

export function getButtonStyle(buttonStyle: any) {
const hoverColor = genHoverColor(buttonStyle.background);
const activeColor = genActiveColor(buttonStyle.background);
const hoverColor = buttonStyle.background && genHoverColor(buttonStyle.background);
const activeColor = buttonStyle.background && genActiveColor(buttonStyle.background);
return css`
&&& {
border-radius: ${buttonStyle.radius};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IconComp } from "comps/comps/iconComp";
import { ControlButton } from "comps/comps/meetingComp/controlButton";
import { trans } from "i18n";
import Example from "../../common/Example";
import ExampleGroup from "../../common/ExampleGroup";
Expand All @@ -16,19 +16,19 @@ export default function IconButtonExample() {
prefixIcon: "/icon:solid/align-justify",
iconSize: "30px",
}}
compFactory={IconComp}
compFactory={ControlButton}
/>
<Example
title={trans("componentDoc.loading")}
width={120}
config={{ type: "default", text: trans("componentDoc.submit"), loading: true }}
compFactory={IconComp}
compFactory={ControlButton}
/>
<Example
title={trans("componentDoc.disabled")}
width={120}
config={{ type: "default", text: trans("componentDoc.submit"), disabled: true }}
compFactory={IconComp}
compFactory={ControlButton}
/>
</ExampleGroup>

Expand All @@ -39,23 +39,23 @@ export default function IconButtonExample() {
config={{
style: { backgroundColor: "#CD574C", borderColor: "#AC3A32", color: "#E0ECF6" },
}}
compFactory={IconComp}
compFactory={ControlButton}
/>
<Example
title={trans("componentDoc.warning")}
width={120}
config={{
style: { backgroundColor: "#F4A125", borderColor: "#DA7D16", color: "#000000" },
}}
compFactory={IconComp}
compFactory={ControlButton}
/>
<Example
title={trans("componentDoc.success")}
width={120}
config={{
style: { backgroundColor: "#5E8D6E", borderColor: "#40694E", color: "#E0ECF6" },
}}
compFactory={IconComp}
compFactory={ControlButton}
/>
</ExampleGroup>
</>
Expand Down