2020-03-12 09:41:35 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import classNames from 'classnames';
|
2020-05-11 16:07:22 +00:00
|
|
|
import { ContainerWidthContextProvider } from '@woocommerce/base-context';
|
2020-03-12 09:41:35 +00:00
|
|
|
|
2020-03-27 20:56:48 +00:00
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import './style.scss';
|
2023-01-05 07:56:05 +00:00
|
|
|
interface SidebarLayoutProps {
|
|
|
|
children: JSX.Element | JSX.Element[];
|
|
|
|
className: string;
|
|
|
|
}
|
2020-03-27 20:56:48 +00:00
|
|
|
|
2023-01-05 07:56:05 +00:00
|
|
|
const SidebarLayout = ( {
|
|
|
|
children,
|
|
|
|
className,
|
|
|
|
}: SidebarLayoutProps ): JSX.Element => {
|
2020-03-12 09:41:35 +00:00
|
|
|
return (
|
2020-05-11 16:07:22 +00:00
|
|
|
<ContainerWidthContextProvider
|
2020-06-17 09:53:42 +00:00
|
|
|
className={ classNames(
|
|
|
|
'wc-block-components-sidebar-layout',
|
|
|
|
className
|
|
|
|
) }
|
2020-05-05 08:10:02 +00:00
|
|
|
>
|
2020-03-12 09:41:35 +00:00
|
|
|
{ children }
|
2020-05-11 16:07:22 +00:00
|
|
|
</ContainerWidthContextProvider>
|
2020-03-12 09:41:35 +00:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default SidebarLayout;
|