import { PropsWithChildren, memo } from 'react';
import { Flexbox } from 'react-layout-kit';

const CategoryContainer = memo<PropsWithChildren<{ top?: number }>>(({ children, top = 64 }) => {
  return (
    <Flexbox
      as={'aside'}
      flex={'none'}
      height={`calc(100vh - ${top * 2 + 4}px)`}
      style={{ overflowX: 'hidden', overflowY: 'hidden', position: 'fixed', width: '180px', height: '100vh', backgroundColor: '#fff', borderBottom: "2px solid #ddd" }}
      width={220}
    >
      {children}
    </Flexbox>
  );
});

export default CategoryContainer;
