ant-design/.dumi/theme/layouts/SidebarLayout/index.tsx
lijianan 371c10c01f
site: update dumi type (#47326)
* site: update dumi type

* fix: fix

* fix: fix

* fix: fix

* fix: fix
2024-02-04 17:08:39 +08:00

28 lines
679 B
TypeScript

import type { PropsWithChildren } from 'react';
import React from 'react';
import { createStyles } from 'antd-style';
import CommonHelmet from '../../common/CommonHelmet';
import Content from '../../slots/Content';
import Sidebar from '../../slots/Sidebar';
const useStyle = createStyles(({ css, token }) => ({
main: css`
display: flex;
margin-top: ${token.contentMarginTop}px;
`,
}));
const SidebarLayout: React.FC<PropsWithChildren> = ({ children }) => {
const { styles } = useStyle();
return (
<main className={styles.main}>
<CommonHelmet />
<Sidebar />
<Content>{children}</Content>
</main>
);
};
export default SidebarLayout;