diff --git a/web/src/components/AdminDataTable.tsx b/web/src/components/AdminDataTable.tsx new file mode 100644 index 0000000..05467d5 --- /dev/null +++ b/web/src/components/AdminDataTable.tsx @@ -0,0 +1,21 @@ +import type {TableProps} from 'antd'; +import {Table, theme} from 'antd'; + +/** 管理列表共用的数据表格:紧凑、直角,并跟随 Ant Design 主题背景。 */ +export const AdminDataTable = (props: TableProps) => { + const {token} = theme.useToken(); + + return ( +
+ + size="small" + {...props} + styles={{ + root: {borderRadius: 0, background: token.colorBgContainer}, + content: {borderRadius: 0, background: token.colorBgContainer}, + ...props.styles, + }} + /> +
+ ); +}; diff --git a/web/src/components/PagePanel.tsx b/web/src/components/PagePanel.tsx new file mode 100644 index 0000000..b27761f --- /dev/null +++ b/web/src/components/PagePanel.tsx @@ -0,0 +1,14 @@ +import type {HTMLAttributes, PropsWithChildren} from 'react'; +import {cn} from '@/lib/utils'; + +type PagePanelProps = PropsWithChildren>; + +/** 一级页面使用的统一内容面板。 */ +export const PagePanel = ({children, className, ...props}: PagePanelProps) => ( +
+ {children} +
+);