Skip to content

Commit 9408350

Browse files
committed
add customizeable icon burger icon
1 parent 16e9d0a commit 9408350

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

client/packages/lowcoder/src/comps/comps/layout/mobileTabLayout.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ function renderHamburgerLayoutSection(children: any): any {
404404
const drawerPlacement = children.drawerPlacement.getView();
405405
return (
406406
<>
407+
{children.hamburgerIcon.propertyView({ label: "Icon" })}
407408
{children.hamburgerPosition.propertyView({ label: "Hamburger Position" })}
408409
{children.hamburgerSize.propertyView({ label: "Hamburger Size" })}
409410
{children.drawerPlacement.propertyView({ label: "Drawer Placement" })}
@@ -465,6 +466,7 @@ let MobileTabLayoutTmp = (function () {
465466
}),
466467
// Mode & hamburger/drawer config
467468
menuMode: dropdownControl(MobileModeOptions, MobileMode.Vertical),
469+
hamburgerIcon: IconControl,
468470
hamburgerPosition: dropdownControl(HamburgerPositionOptions, "bottom-right"),
469471
hamburgerSize: withDefault(StringControl, "56px"),
470472
drawerPlacement: dropdownControl(DrawerPlacementOptions, "bottom"),
@@ -536,6 +538,7 @@ MobileTabLayoutTmp = withViewFn(MobileTabLayoutTmp, (comp) => {
536538
const menuMode = comp.children.menuMode.getView();
537539
const hamburgerPosition = comp.children.hamburgerPosition.getView();
538540
const hamburgerSize = comp.children.hamburgerSize.getView();
541+
const hamburgerIconComp = comp.children.hamburgerIcon;
539542
const drawerPlacement = comp.children.drawerPlacement.getView();
540543
const drawerHeight = comp.children.drawerHeight.getView();
541544
const drawerWidth = comp.children.drawerWidth.getView();
@@ -657,7 +660,9 @@ MobileTabLayoutTmp = withViewFn(MobileTabLayoutTmp, (comp) => {
657660
$zIndex={Layers.tabBar + 1}
658661
onClick={() => setDrawerVisible(true)}
659662
>
660-
<BurgerIcon $lineColor={navStyle.text} />
663+
{hamburgerIconComp.toJsonValue()
664+
? hamburgerIconComp.getView()
665+
: <BurgerIcon $lineColor={navStyle.text} />}
661666
</HamburgerButton>
662667
);
663668

0 commit comments

Comments
 (0)