feat(web): add PageTabs component
This commit is contained in:
13
web/src/components/PageTabs/index.module.css
Normal file
13
web/src/components/PageTabs/index.module.css
Normal 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);
|
||||
}
|
||||
18
web/src/components/PageTabs/index.tsx
Normal file
18
web/src/components/PageTabs/index.tsx
Normal 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;
|
||||
Reference in New Issue
Block a user