Skip to content

Commit 7b92927

Browse files
committed
added component docs for multiple components
1 parent b0a63f7 commit 7b92927

File tree

23 files changed

+1824
-3
lines changed

23 files changed

+1824
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ TransferBasicComp = class extends TransferBasicComp {
186186
}
187187
};
188188

189-
export const transferComp = withExposingConfigs(TransferBasicComp, [
189+
export const TransferComp = withExposingConfigs(TransferBasicComp, [
190190
new NameConfig("items", trans("transfer.items")),
191191
new NameConfig("targetKeys", trans("transfer.targetKeys")),
192192
new NameConfig("targerObject", trans("transfer.targerObject")),

client/packages/lowcoder/src/pages/ComponentDoc/examples/ButtonComp/FloatButton.tsx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,27 @@ export default function FloatButtonExample() {
1212
>
1313
<Example
1414
title={trans("componentDoc.default")}
15-
width={120}
1615
config={{
17-
text: trans("componentDoc.submit")
16+
icon: "/icon:antd/questioncircleoutlined",
17+
value: "",
18+
shape: "circle",
19+
manual: [
20+
{
21+
badge: "1",
22+
description: "",
23+
icon: "/icon:antd/filetextoutlined",
24+
id: 0,
25+
label: "Option 1"
26+
},
27+
{
28+
badge: "1",
29+
description: "",
30+
icon: "/icon:antd/filetextoutlined",
31+
id: 1,
32+
label: "Option 2"
33+
}
34+
]
35+
1836
}}
1937
compFactory={FloatButtonComp}
2038
/>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { TimerComp } from "comps/comps/timerComp";
2+
import Example from "../../common/Example";
3+
import ExampleGroup from "../../common/ExampleGroup";
4+
5+
export default function TimerExample() {
6+
return (
7+
<>
8+
<ExampleGroup
9+
title="Basic Usage"
10+
>
11+
<Example
12+
title="Default Value"
13+
config={{
14+
defaultValue: "00:00:03:000",
15+
}}
16+
compFactory={TimerComp}
17+
/>
18+
<Example
19+
title="Hide Buttons"
20+
config={{
21+
defaultValue: "00:00:00:000",
22+
hideButton: true,
23+
}}
24+
compFactory={TimerComp}
25+
/>
26+
</ExampleGroup>
27+
</>
28+
);
29+
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
import { ColumnLayoutComp } from "comps/comps/columnLayout/columnLayout";
2+
import Example from "../../common/Example";
3+
import ExampleGroup from "../../common/ExampleGroup";
4+
5+
export default function ColumnLayoutExample() {
6+
return (
7+
<>
8+
<ExampleGroup
9+
title="Basic Usage"
10+
description="The Following Examples Show the Basic Usage of the Column Layout Component."
11+
>
12+
<Example
13+
title="Hiding the Component"
14+
config={{
15+
hidden: true,
16+
}}
17+
compFactory={ColumnLayoutComp}
18+
/>
19+
<Example
20+
title="Disabling the Component"
21+
config={{
22+
disabled: true,
23+
}}
24+
compFactory={ColumnLayoutComp}
25+
/>
26+
<Example
27+
title="Multiple Columns"
28+
config={{
29+
columns:{
30+
manual:[
31+
{
32+
id:0,
33+
label:"Column1",
34+
},
35+
{
36+
id:1,
37+
label:"Column2",
38+
},
39+
{
40+
id:2,
41+
label:"Column3",
42+
},
43+
]
44+
}
45+
}}
46+
compFactory={ColumnLayoutComp}
47+
/>
48+
</ExampleGroup>
49+
50+
<ExampleGroup
51+
title="Column's Layout"
52+
description="The Following Examples Show the Column Layout options on Column Layout Component."
53+
>
54+
<Example
55+
title="Column Definition"
56+
config={{
57+
templateColumns: "1fr 1fr 1fr 1fr",
58+
}}
59+
compFactory={ColumnLayoutComp}
60+
/>
61+
<Example
62+
title="Row Definition"
63+
config={{
64+
templateRows: "1fr 1fr",
65+
}}
66+
compFactory={ColumnLayoutComp}
67+
/>
68+
<Example
69+
title="Column Gap"
70+
config={{
71+
columnGap: "50px",
72+
}}
73+
compFactory={ColumnLayoutComp}
74+
/>
75+
</ExampleGroup>
76+
</>
77+
);
78+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import { ContainerComp } from "comps/comps/containerComp/containerComp";
2+
import Example from "../../common/Example";
3+
import ExampleGroup from "../../common/ExampleGroup";
4+
5+
export default function ContainerExample() {
6+
return (
7+
<>
8+
<ExampleGroup
9+
title="Basic Usage"
10+
description="The Following Examples Show the Basic Usage of the Container Component."
11+
>
12+
<Example
13+
title="Hiding the Component"
14+
config={{
15+
hidden: true,
16+
}}
17+
compFactory={ContainerComp}
18+
/>
19+
<Example
20+
title="Disabling the Component"
21+
config={{
22+
disabled: true,
23+
}}
24+
compFactory={ContainerComp}
25+
/>
26+
</ExampleGroup>
27+
28+
<ExampleGroup
29+
title="Layout"
30+
description="The Following Examples Show the Layout options of the Container Component."
31+
>
32+
<Example
33+
title="Setting the Inner Container Properties"
34+
config={{
35+
container:{
36+
showHeader: true,
37+
showBody: true,
38+
showFooter: true,
39+
}
40+
}}
41+
compFactory={ContainerComp}
42+
/>
43+
</ExampleGroup>
44+
</>
45+
);
46+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import { PageLayoutComp } from "comps/comps/containerComp/pageLayoutComp";
2+
import Example from "../../common/Example";
3+
import ExampleGroup from "../../common/ExampleGroup";
4+
5+
export default function PageLayoutExample() {
6+
return (
7+
<>
8+
<ExampleGroup
9+
title="Basic Usage"
10+
description="The Following Examples Show the Basic Usage of the Component."
11+
>
12+
<Example
13+
title="Hiding the Component"
14+
config={{
15+
hidden: true,
16+
}}
17+
compFactory={PageLayoutComp}
18+
/>
19+
<Example
20+
title="Disabling the Component"
21+
config={{
22+
disabled: true,
23+
}}
24+
compFactory={PageLayoutComp}
25+
/>
26+
</ExampleGroup>
27+
28+
<ExampleGroup
29+
title="Layout"
30+
description="The Following Examples Show the Layout options on Component."
31+
>
32+
<Example
33+
title="Hiding the Component"
34+
config={{
35+
container:{
36+
header:{
37+
layout:{
38+
39+
}
40+
},
41+
footer:{
42+
layout:{
43+
44+
}
45+
},
46+
showHeader: true,
47+
showFooter: true,
48+
sider:{
49+
layout:{
50+
}
51+
},
52+
showSider: true,
53+
siderCollapsed: true,
54+
siderWidth: "40%",
55+
}
56+
}}
57+
compFactory={PageLayoutComp}
58+
/>
59+
</ExampleGroup>
60+
</>
61+
);
62+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import { ResponsiveLayoutComp } from "comps/comps/responsiveLayout/responsiveLayout";
2+
import Example from "../../common/Example";
3+
import ExampleGroup from "../../common/ExampleGroup";
4+
5+
export default function ResponsiveLayoutExample() {
6+
return (
7+
<>
8+
<ExampleGroup
9+
title="Basic Usage"
10+
description="The Following Examples Show the Basic Usage of the Component."
11+
>
12+
<Example
13+
title="Hiding the Component"
14+
config={{
15+
hidden: true,
16+
}}
17+
compFactory={ResponsiveLayoutComp}
18+
/>
19+
<Example
20+
title="Disabling the Component"
21+
config={{
22+
disabled: true,
23+
}}
24+
compFactory={ResponsiveLayoutComp}
25+
/>
26+
</ExampleGroup>
27+
28+
<ExampleGroup
29+
title="Layout"
30+
description="The Following Examples Show the Layout options on Component."
31+
>
32+
<Example
33+
title="Hiding the Component"
34+
config={{
35+
hidden: true,
36+
}}
37+
compFactory={ResponsiveLayoutComp}
38+
/>
39+
<Example
40+
title="Disabling the Component"
41+
config={{
42+
disabled: true,
43+
}}
44+
compFactory={ResponsiveLayoutComp}
45+
/>
46+
</ExampleGroup>
47+
</>
48+
);
49+
}

0 commit comments

Comments
 (0)