diff --git a/src/plugins/kibana_react/public/page_template/page_template.test.tsx b/src/plugins/kibana_react/public/page_template/page_template.test.tsx index 43f96a6c2b98c..2fdedce23b09b 100644 --- a/src/plugins/kibana_react/public/page_template/page_template.test.tsx +++ b/src/plugins/kibana_react/public/page_template/page_template.test.tsx @@ -125,4 +125,20 @@ describe('KibanaPageTemplate', () => { ); expect(component).toMatchSnapshot(); }); + + test('render sidebar classes', () => { + const component = shallow( + + ); + expect(component.prop('pageSideBarProps').className).toEqual( + 'kbnPageTemplate__pageSideBar customClass' + ); + }); }); diff --git a/src/plugins/kibana_react/public/page_template/page_template.tsx b/src/plugins/kibana_react/public/page_template/page_template.tsx index dabec978b67a4..1e63f2e068508 100644 --- a/src/plugins/kibana_react/public/page_template/page_template.tsx +++ b/src/plugins/kibana_react/public/page_template/page_template.tsx @@ -48,6 +48,7 @@ export const KibanaPageTemplate: FunctionComponent = ({ isEmptyState, restrictWidth = true, pageSideBar, + pageSideBarProps, solutionNav, ...rest }) => { @@ -117,8 +118,8 @@ export const KibanaPageTemplate: FunctionComponent = ({ pageSideBar={pageSideBar} pageSideBarProps={{ paddingSize: solutionNav ? 'none' : 'l', - ...rest.pageSideBarProps, - className: classNames(sideBarClasses, rest.pageSideBarProps?.className), + ...pageSideBarProps, + className: classNames(sideBarClasses, pageSideBarProps?.className), }} {...rest} >