feat(web): add PageTabs component

This commit is contained in:
zhaoying
2026-01-27 19:17:32 +08:00
parent 3a0f07d36f
commit 74f0018962
2 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
.page-tabs:global(.ant-segmented) {
background-color: rgba(91, 97, 103, 0.08);
padding: 4px;
}
.page-tabs:global(.ant-segmented .ant-segmented-item-label) {
line-height: 24px;
min-height: 24px;
padding: 0 12px;
}
.page-tabs:global(.ant-segmented .ant-segmented-item-selected) {
box-shadow: 0px 2px 4px 0px rgba(33, 35, 50, 0.16);
}

View File

@@ -0,0 +1,18 @@
import { type FC } from 'react';
import { Segmented, type SegmentedProps } from 'antd';
import styles from './index.module.css';
const PageTabs: FC<SegmentedProps> = ({
value,
options,
onChange
}) => {
return <Segmented
value={value}
options={options}
onChange={onChange}
className={styles.pageTabs}
/>;
};
export default PageTabs;