2020-03-12 09:41:35 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import classNames from 'classnames';
|
2020-03-13 15:49:33 +00:00
|
|
|
import PropTypes from 'prop-types';
|
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';
|
|
|
|
|
2020-03-12 09:41:35 +00:00
|
|
|
const SidebarLayout = ( { children, className } ) => {
|
|
|
|
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
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2020-03-13 15:49:33 +00:00
|
|
|
SidebarLayout.propTypes = {
|
|
|
|
className: PropTypes.string,
|
|
|
|
};
|
|
|
|
|
2020-03-12 09:41:35 +00:00
|
|
|
export default SidebarLayout;
|