@@ -12,6 +12,7 @@ import styled from "styled-components";
12
12
import { useSelector } from "react-redux" ;
13
13
import { MenuOutlined } from "@ant-design/icons" ;
14
14
import { Drawer , Button } from "antd" ;
15
+ import { getBrandingSetting } from "@lowcoder-ee/redux/selectors/enterpriseSelectors" ;
15
16
16
17
type LayoutProps = {
17
18
sections : SideBarSectionProps [ ] ;
@@ -59,6 +60,7 @@ const DrawerContentWrapper = styled.div`
59
60
export function Layout ( props : LayoutProps ) {
60
61
const [ drawerVisible , setDrawerVisible ] = useState ( false ) ;
61
62
const [ isMobile , setIsMobile ] = useState ( false ) ;
63
+ const brandingSettings = useSelector ( getBrandingSetting ) ;
62
64
63
65
const toggleDrawer = ( ) => {
64
66
setDrawerVisible ( ! drawerVisible ) ;
@@ -124,7 +126,13 @@ export function Layout(props: LayoutProps) {
124
126
destroyOnHidden // Ensure drawer content is removed when closed
125
127
>
126
128
< DrawerContentWrapper >
127
- < SideBarV2 className = { CNSidebar } >
129
+ < SideBarV2
130
+ className = { CNSidebar }
131
+ $bgColor = { brandingSettings ?. config_set ?. adminSidebarColor }
132
+ $fontColor = { brandingSettings ?. config_set ?. adminSidebarFontColor }
133
+ $activeBgColor = { brandingSettings ?. config_set ?. adminSidebarActiveBgColor }
134
+ $activeFontColor = { brandingSettings ?. config_set ?. adminSidebarActiveFontColor }
135
+ >
128
136
{ mobileSections
129
137
. filter ( ( section ) => section . items . length > 0 )
130
138
. map ( ( section , index ) => (
@@ -141,7 +149,13 @@ export function Layout(props: LayoutProps) {
141
149
{ /* Desktop Layout */ }
142
150
< AntdLayout >
143
151
{ ! isMobile && (
144
- < SideBarV2 className = { `${ CNSidebar } desktop-only` } >
152
+ < SideBarV2
153
+ className = { `${ CNSidebar } desktop-only` }
154
+ $bgColor = { brandingSettings ?. config_set ?. adminSidebarColor }
155
+ $fontColor = { brandingSettings ?. config_set ?. adminSidebarFontColor }
156
+ $activeBgColor = { brandingSettings ?. config_set ?. adminSidebarActiveBgColor }
157
+ $activeFontColor = { brandingSettings ?. config_set ?. adminSidebarActiveFontColor }
158
+ >
145
159
{ desktopSections
146
160
. filter ( ( section ) => section . items . length > 0 )
147
161
. map ( ( section , index ) => (
0 commit comments