You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
594 B
24 lines
594 B
export default function MineSegment({
|
|
tabIndex,
|
|
setTabIndex,
|
|
}: {
|
|
tabIndex: number;
|
|
setTabIndex: (idx: number) => void;
|
|
}) {
|
|
return (
|
|
<section className="px-4 py-5 flex">
|
|
<div
|
|
className={`flex-1 h-10 rounded-l-md ${tabIndex === 0 ? 'btn-contained' : 'btn-elevated'}`}
|
|
onClick={() => setTabIndex(0)}
|
|
>
|
|
测量数据
|
|
</div>
|
|
<div
|
|
className={`flex-1 h-10 rounded-r-md ${tabIndex === 1 ? 'btn-contained' : 'btn-elevated'}`}
|
|
onClick={() => setTabIndex(1)}
|
|
>
|
|
未上传数据
|
|
</div>
|
|
</section>
|
|
);
|
|
}
|