@@ -8,12 +8,17 @@ import { withDispatchHook } from "comps/generators/withDispatchHook";
8
8
import { NameAndExposingInfo } from "comps/utils/exposingTypes" ;
9
9
import { ALL_APPLICATIONS_URL } from "constants/routesURL" ;
10
10
import { TopHeaderHeight } from "constants/style" ;
11
- import { Section } from "lowcoder-design" ;
11
+ import { Section , sectionNames } from "lowcoder-design" ;
12
12
import { trans } from "i18n" ;
13
13
import { EditorContainer , EmptyContent } from "pages/common/styledComponent" ;
14
14
import { useCallback , useEffect , useMemo , useState } from "react" ;
15
15
import styled from "styled-components" ;
16
16
import { isUserViewMode , useAppPathParam } from "util/hooks" ;
17
+ import { StringControl } from "comps/controls/codeControl" ;
18
+ import { styleControl } from "comps/controls/styleControl" ;
19
+ import { NavLayoutStyle } from "comps/controls/styleControlConstants" ;
20
+
21
+ const DEFAULT_WIDTH = 240 ;
17
22
18
23
const StyledSide = styled ( Layout . Sider ) `
19
24
max-height: calc(100vh - ${ TopHeaderHeight } );
@@ -46,6 +51,8 @@ let NavTmpLayout = (function () {
46
51
label : trans ( "menuItem" ) + " 1" ,
47
52
} ,
48
53
] ) ,
54
+ width : StringControl ,
55
+ style : styleControl ( NavLayoutStyle ) ,
49
56
} ;
50
57
return new MultiCompBuilder ( childrenMap , ( props ) => {
51
58
return null ;
@@ -54,6 +61,16 @@ let NavTmpLayout = (function () {
54
61
return (
55
62
< >
56
63
< Section name = { trans ( "menu" ) } > { menuPropertyView ( children . items ) } </ Section >
64
+ < Section name = { sectionNames . layout } >
65
+ { children . width . propertyView ( {
66
+ label : trans ( "drawer.width" ) ,
67
+ tooltip : trans ( "drawer.widthTooltip" ) ,
68
+ placeholder : DEFAULT_WIDTH + "" ,
69
+ } ) }
70
+ </ Section >
71
+ < Section name = { sectionNames . style } >
72
+ { children . style . getPropertyView ( ) }
73
+ </ Section >
57
74
</ >
58
75
) ;
59
76
} )
@@ -195,7 +212,7 @@ NavTmpLayout = withViewFn(NavTmpLayout, (comp) => {
195
212
196
213
let content = (
197
214
< Layout >
198
- < StyledSide theme = "light" width = { 240 } >
215
+ < StyledSide theme = "light" width = { DEFAULT_WIDTH } >
199
216
< AntdMenu
200
217
items = { menuItems }
201
218
mode = "inline"
0 commit comments