Skip to content

Commit 15d1ed0

Browse files
author
FalkWolsky
committed
Adapting Theme Comp Panel for better usability
1 parent 0b69057 commit 15d1ed0

File tree

2 files changed

+24
-30
lines changed

2 files changed

+24
-30
lines changed

client/packages/lowcoder/src/pages/setting/theme/ThemeCompPanel.tsx

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
labelCss,
2222
sectionNames,
2323
} from "lowcoder-design";
24-
import { Card, Divider, Flex, Input } from "antd";
24+
import { Card, Divider, Flex, Input, List } from "antd";
2525
import { genRandomKey } from "comps/utils/idGenerator";
2626
import dsl from "./detail/previewDsl";
2727
import { NameGenerator } from "comps/utils";
@@ -330,31 +330,32 @@ export const ThemeCompPanel = (props: any) => {
330330
// )
331331

332332
return (
333-
<Card
334-
style={{ marginBottom: "20px", minHeight : "200px" }}
335-
bodyStyle={{ padding: '24px 14px'}}
336-
>
337333
<Flex style={{
338-
height: "650px",
339334
overflow: "hidden",
340335
gap: "middle",
341336
}}>
342-
<RightPanelContentWrapper style={{
343-
padding: "0",
344-
overflow: "auto",
345-
}}>
346-
<Input.Search
347-
placeholder="Search components"
348-
value={searchValue}
349-
onChange={(e) => setSearchValue(e.target.value)}
350-
style={{ marginBottom: 16 }}
351-
/>
352-
<PropertySectionContext.Provider
353-
value={propertySectionContextValue}
354-
>
355-
{compList}
356-
</PropertySectionContext.Provider>
357-
</RightPanelContentWrapper>
337+
<List
338+
bordered
339+
itemLayout="vertical"
340+
>
341+
<List.Item>
342+
<Input.Search
343+
placeholder="Search components"
344+
value={searchValue}
345+
onChange={(e) => setSearchValue(e.target.value)}
346+
style={{ marginBottom: 16 }}
347+
/>
348+
</List.Item>
349+
<List.Item>
350+
<div style={{overflow : "auto", height: "540px"}}>
351+
<PropertySectionContext.Provider
352+
value={propertySectionContextValue}
353+
>
354+
{compList}
355+
</PropertySectionContext.Provider>
356+
</div>
357+
</List.Item>
358+
</List>
358359
<Divider type="vertical" style={{height: "630px"}}/>
359360
<div style={{flex: "1"}}>
360361
{appPreview}
@@ -368,6 +369,5 @@ export const ThemeCompPanel = (props: any) => {
368369
{stylePropertyView}
369370
</div>
370371
</Flex>
371-
</Card>
372372
);
373373
};

client/packages/lowcoder/src/pages/setting/theme/detail/index.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -522,13 +522,7 @@ class ThemeDetailPage extends React.Component<ThemeDetailPageProps, ThemeDetailP
522522
<StyleThemeSettingsCover>
523523
<ShapesCompIcon width={"36px"} style={{marginRight : "10px"}}/> <h2 style={{color: "#ffffff", marginTop : "8px"}}> {trans("theme.components")}</h2>
524524
</StyleThemeSettingsCover>
525-
<Card
526-
bodyStyle={{
527-
padding: '20px'
528-
}}
529-
style={{
530-
marginBottom: "20px",
531-
}}
525+
<Card style={{ marginBottom: "20px", minHeight : "200px" }}
532526
>
533527
<ThemeCompPanel
534528
theme={this.state.theme}

0 commit comments

Comments
 (0)