2023-07-20 19:27:33 +08:00
|
|
|
import { createStyles } from 'antd-style';
|
2023-02-03 13:39:46 +08:00
|
|
|
import type { PropsWithChildren } from 'react';
|
2022-11-30 11:05:41 +08:00
|
|
|
import React from 'react';
|
2022-11-09 12:28:04 +08:00
|
|
|
import CommonHelmet from '../../common/CommonHelmet';
|
2023-02-03 13:39:46 +08:00
|
|
|
import Content from '../../slots/Content';
|
|
|
|
import Sidebar from '../../slots/Sidebar';
|
|
|
|
|
2023-07-20 19:27:33 +08:00
|
|
|
const useStyle = createStyles(({ css }) => ({
|
2023-02-03 13:39:46 +08:00
|
|
|
main: css`
|
|
|
|
display: flex;
|
2023-02-05 19:03:59 +08:00
|
|
|
margin-top: 40px;
|
2023-02-03 13:39:46 +08:00
|
|
|
`,
|
2023-07-20 19:27:33 +08:00
|
|
|
}));
|
2022-11-09 12:28:04 +08:00
|
|
|
|
2023-02-03 13:39:46 +08:00
|
|
|
const SidebarLayout: React.FC<PropsWithChildren<{}>> = ({ children }) => {
|
2023-07-20 19:27:33 +08:00
|
|
|
const { styles } = useStyle();
|
2023-02-03 13:39:46 +08:00
|
|
|
return (
|
2023-07-20 19:27:33 +08:00
|
|
|
<main className={styles.main}>
|
2023-02-03 13:39:46 +08:00
|
|
|
<CommonHelmet />
|
|
|
|
<Sidebar />
|
|
|
|
<Content>{children}</Content>
|
|
|
|
</main>
|
|
|
|
);
|
|
|
|
};
|
2022-11-09 12:28:04 +08:00
|
|
|
|
|
|
|
export default SidebarLayout;
|