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