2023-01-05 07:56:05 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
2023-03-02 14:26:00 +00:00
|
|
|
import { forwardRef } from '@wordpress/element';
|
2023-01-05 07:56:05 +00:00
|
|
|
import classNames from 'classnames';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
|
|
|
import { ForwardRefProps } from './types';
|
|
|
|
|
2024-05-22 22:09:50 +00:00
|
|
|
const Sidebar = forwardRef< HTMLDivElement, ForwardRefProps >(
|
2023-01-05 07:56:05 +00:00
|
|
|
( { children, className = '' }, ref ): JSX.Element => {
|
|
|
|
return (
|
|
|
|
<div
|
|
|
|
ref={ ref }
|
|
|
|
className={ classNames(
|
|
|
|
'wc-block-components-sidebar',
|
|
|
|
className
|
|
|
|
) }
|
|
|
|
>
|
|
|
|
{ children }
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
export default Sidebar;
|