Skip to content

Commit 83eec96

Browse files
authoredMar 22, 2025
Merge pull request #1570 from lowcoder-org/doc/existing_components
added examples for different components
2 parents 9c574d5 + bcd7caf commit 83eec96

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+6866
-101
lines changed
 

‎client/packages/lowcoder/src/pages/ComponentDoc/examples/ButtonComp/Button.tsx

+40
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,24 @@ export default function ButtonExample() {
2828
config={{ type: "default", text: trans("componentDoc.submit"), disabled: true }}
2929
compFactory={ButtonComp}
3030
/>
31+
<Example
32+
title="Hiding the Button component"
33+
width={120}
34+
config={{ type: "default", text: trans("componentDoc.submit"), hidden: true }}
35+
compFactory={ButtonComp}
36+
/>
37+
<Example
38+
title="Prefix Icon"
39+
width={120}
40+
config={{ type: "default", text: trans("componentDoc.submit"), prefixIcon: "/icon:solid/book", }}
41+
compFactory={ButtonComp}
42+
/>
43+
<Example
44+
title="Suffix Icon"
45+
width={120}
46+
config={{ type: "default", text: trans("componentDoc.submit"), suffixIcon : "/icon:solid/book-open-reader", }}
47+
compFactory={ButtonComp}
48+
/>
3149
</ExampleGroup>
3250

3351
<ExampleGroup title={trans("componentDoc.style")}>
@@ -55,6 +73,28 @@ export default function ButtonExample() {
5573
}}
5674
compFactory={ButtonComp}
5775
/>
76+
<Example
77+
title="Custom Styling"
78+
width={180}
79+
config={{
80+
style: {
81+
"background": "linear-gradient(90deg, #fa709a 0%, #fee140 100%)",
82+
"padding": "10px",
83+
"text": "#222222",
84+
"textTransform": "Uppercase",
85+
"textDecoration": "underline",
86+
"textSize": "16px",
87+
"textWeight": "bold",
88+
"fontFamily": "Courier New",
89+
"fontStyle": "italic",
90+
"border": "#222222",
91+
"borderStyle": "solid",
92+
"radius": "10px",
93+
"borderWidth": "2px"
94+
},
95+
}}
96+
compFactory={ButtonComp}
97+
/>
5898
</ExampleGroup>
5999
</>
60100
);

‎client/packages/lowcoder/src/pages/ComponentDoc/examples/ButtonComp/DropDownButton.tsx

+90-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ export default function DropdownExample() {
3232
};
3333
return (
3434
<>
35+
3536
<ExampleGroup
3637
title={trans("componentDoc.basicUsage")}
37-
description={trans("componentDoc.basicDemoDescription")}
38+
description="The Following Examples Show the Basic Usage of the Dropdown Component."
39+
3840
>
3941
<Example
4042
title={trans("componentDoc.default")}
@@ -55,14 +57,99 @@ export default function DropdownExample() {
5557
blackListConfig={blackListConfig}
5658
compFactory={DropdownComp}
5759
/>
60+
<Example
61+
title="Hiding the Dropdown component"
62+
width={120}
63+
config={{
64+
type: "default",
65+
text: trans("componentDoc.menu"),
66+
hidden: true,
67+
options: options,
68+
}}
69+
blackListConfig={blackListConfig}
70+
compFactory={DropdownComp}
71+
/>
5872
</ExampleGroup>
5973

60-
<ExampleGroup title={trans("componentDoc.style")}>
74+
<ExampleGroup
75+
title="Layout"
76+
description="The Following Examples Show the Layout options of the Dropdown Component."
77+
>
78+
<Example
79+
title="Display Dropdown without the Dots"
80+
width={120}
81+
config={{
82+
onlyMenu: true,
83+
}}
84+
compFactory={DropdownComp}
85+
/>
86+
<Example
87+
title="Show Dropdown options on Hover"
88+
width={120}
89+
config={{
90+
onlyMenu: true,
91+
triggerMode: "hover",
92+
}}
93+
compFactory={DropdownComp}
94+
/>
6195
<Example
62-
title={trans("componentDoc.onlyMenu")}
96+
title="Show Dropdown options on Click"
6397
width={120}
6498
config={{
6599
onlyMenu: true,
100+
triggerMode: "click",
101+
}}
102+
compFactory={DropdownComp}
103+
/>
104+
</ExampleGroup>
105+
106+
<ExampleGroup
107+
title="Styling Properties"
108+
description="The Following Examples Show the different Styling properties on the Dropdown Component."
109+
>
110+
<Example
111+
title="Background Color"
112+
width={120}
113+
config={{
114+
style:{
115+
"background": "linear-gradient(135deg, #72afd3 0%, #96e6a1 100%)",
116+
},
117+
}}
118+
compFactory={DropdownComp}
119+
/>
120+
<Example
121+
title="Margin & Padding"
122+
width={120}
123+
config={{
124+
style:{
125+
"background": "linear-gradient(135deg, #00FFFF 0%, #00FFFF 100%)",
126+
"margin": "10px",
127+
"padding": "10px",
128+
},
129+
}}
130+
compFactory={DropdownComp}
131+
/>
132+
<Example
133+
title="Border Radius"
134+
width={120}
135+
config={{
136+
style:{
137+
"background": "linear-gradient(135deg, #00FFFF 0%, #00FFFF 100%)",
138+
"radius": "15px"
139+
},
140+
}}
141+
compFactory={DropdownComp}
142+
/>
143+
<Example
144+
title="Text Properties"
145+
width={120}
146+
config={{
147+
style:{
148+
"text": "#E67373",
149+
"textSize": "25px",
150+
"textWeight": "bold",
151+
"fontStyle": "italic",
152+
},
66153
}}
67154
compFactory={DropdownComp}
68155
/>

0 commit comments

Comments
 (0)