import { PageContainer, PageContainerProps } from '@ant-design/pro-components';
import { Space } from 'antd';

export function MyPageContainer({
  title,
  children,
  ...rest
}: PageContainerProps) {
  return (
    <PageContainer
      fixedHeader
      header={{
        title: title,
        style: { backgroundColor: '#FFF' },
      }}
      token={{
        paddingBlockPageContainerContent: 0,
        paddingInlinePageContainerContent: 0,
      }}
      {...rest}
    >
      <Space direction="vertical" size="middle" style={{ width: '100%' }}>
        {children}
      </Space>
    </PageContainer>
  );
}
