|
|
|
@ -7,24 +7,21 @@ export default function Tab({
|
|
|
|
|
value: string;
|
|
|
|
|
changeTab: (value: string) => void;
|
|
|
|
|
}) {
|
|
|
|
|
const tabs = [
|
|
|
|
|
{ name: 'qrCode', label: '扫码登录' },
|
|
|
|
|
{ name: 'phone', label: '手机登录' },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className={`flex justify-center gap-24px w-full ${className}`}>
|
|
|
|
|
{tabs.map((tab) => {
|
|
|
|
|
return (
|
|
|
|
|
<div className={`flex justify-center items-center w-full ${className}`}>
|
|
|
|
|
<div
|
|
|
|
|
className={`text-20px leading-28px font-600 cursor-pointer text-#000/40 ${tab.name === value && 'text-#000/95'}`}
|
|
|
|
|
key={tab.name}
|
|
|
|
|
onClick={() => changeTab(tab.name)}
|
|
|
|
|
className={`text-17px leading-24px font-400 cursor-pointer text-#000/70 ${value === 'qrCode' && 'text-#000/95 font-500'}`}
|
|
|
|
|
onClick={() => changeTab('qrCode')}
|
|
|
|
|
>
|
|
|
|
|
{tab.label}
|
|
|
|
|
扫码登录
|
|
|
|
|
</div>
|
|
|
|
|
<div className="h-14.5px mx-10px border-1px border-solid border-#000/40 " />
|
|
|
|
|
<div
|
|
|
|
|
className={`text-17px leading-24px font-400 cursor-pointer text-#000/70 ${value === 'phone' && 'text-#000/95 font-500'}`}
|
|
|
|
|
onClick={() => changeTab('phone')}
|
|
|
|
|
>
|
|
|
|
|
手机登录
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
})}
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|