@@ -8,12 +8,17 @@ import { withDispatchHook } from "comps/generators/withDispatchHook";
88import { NameAndExposingInfo } from "comps/utils/exposingTypes" ;
99import { ALL_APPLICATIONS_URL } from "constants/routesURL" ;
1010import { TopHeaderHeight } from "constants/style" ;
11- import { Section } from "lowcoder-design" ;
11+ import { Section , sectionNames } from "lowcoder-design" ;
1212import { trans } from "i18n" ;
1313import { EditorContainer , EmptyContent } from "pages/common/styledComponent" ;
1414import { useCallback , useEffect , useMemo , useState } from "react" ;
1515import styled from "styled-components" ;
1616import { 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 ;
1722
1823const StyledSide = styled ( Layout . Sider ) `
1924 max-height: calc(100vh - ${ TopHeaderHeight } );
@@ -46,6 +51,8 @@ let NavTmpLayout = (function () {
4651 label : trans ( "menuItem" ) + " 1" ,
4752 } ,
4853 ] ) ,
54+ width : StringControl ,
55+ style : styleControl ( NavLayoutStyle ) ,
4956 } ;
5057 return new MultiCompBuilder ( childrenMap , ( props ) => {
5158 return null ;
@@ -54,6 +61,16 @@ let NavTmpLayout = (function () {
5461 return (
5562 < >
5663 < 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 >
5774 </ >
5875 ) ;
5976 } )
@@ -195,7 +212,7 @@ NavTmpLayout = withViewFn(NavTmpLayout, (comp) => {
195212
196213 let content = (
197214 < Layout >
198- < StyledSide theme = "light" width = { 240 } >
215+ < StyledSide theme = "light" width = { DEFAULT_WIDTH } >
199216 < AntdMenu
200217 items = { menuItems }
201218 mode = "inline"
0 commit comments