|
|
|
@@ -20,49 +20,41 @@ const PlanBadge: FC<PlanBadgeProps> = ({ plan, allowHover, size = 'm', sandboxAs |
|
|
|
|
|
|
|
if (!isFetchedPlan) return null |
|
|
|
if (plan === Plan.sandbox && sandboxAsUpgrade) { |
|
|
|
return <div className='select-none'> |
|
|
|
<PremiumBadge color='blue' allowHover={allowHover} onClick={onClick}> |
|
|
|
<SparklesSoft className='flex items-center py-[1px] pl-[3px] w-3.5 h-3.5 text-components-premium-badge-indigo-text-stop-0' /> |
|
|
|
<div className='system-xs-medium'> |
|
|
|
<span className='p-1'> |
|
|
|
{t('billing.upgradeBtn.encourageShort')} |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</PremiumBadge> |
|
|
|
</div> |
|
|
|
return <PremiumBadge className='select-none' color='blue' allowHover={allowHover} onClick={onClick}> |
|
|
|
<SparklesSoft className='flex items-center py-[1px] pl-[3px] w-3.5 h-3.5 text-components-premium-badge-indigo-text-stop-0' /> |
|
|
|
<div className='system-xs-medium'> |
|
|
|
<span className='p-1'> |
|
|
|
{t('billing.upgradeBtn.encourageShort')} |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</PremiumBadge> |
|
|
|
} |
|
|
|
if (plan === Plan.sandbox) { |
|
|
|
return <div className='select-none'> |
|
|
|
<PremiumBadge size={size} color='gray' allowHover={allowHover} onClick={onClick}> |
|
|
|
<div className={classNames(size === 's' ? 'system-2xs-medium-uppercase' : 'system-xs-medium-uppercase')}> |
|
|
|
<span className='p-1'> |
|
|
|
{plan} |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</PremiumBadge> |
|
|
|
</div> |
|
|
|
return <PremiumBadge className='select-none' size={size} color='gray' allowHover={allowHover} onClick={onClick}> |
|
|
|
<div className={classNames(size === 's' ? 'system-2xs-medium-uppercase' : 'system-xs-medium-uppercase')}> |
|
|
|
<span className='p-1'> |
|
|
|
{plan} |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</PremiumBadge> |
|
|
|
} |
|
|
|
if (plan === Plan.professional) { |
|
|
|
return <div className='select-none'> |
|
|
|
<PremiumBadge size={size} color='blue' allowHover={allowHover} onClick={onClick}> |
|
|
|
<div className={classNames(size === 's' ? 'system-2xs-medium-uppercase' : 'system-xs-medium-uppercase')}> |
|
|
|
<span className='p-1'> |
|
|
|
pro |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</PremiumBadge> |
|
|
|
</div> |
|
|
|
return <PremiumBadge className='select-none' size={size} color='blue' allowHover={allowHover} onClick={onClick}> |
|
|
|
<div className={classNames(size === 's' ? 'system-2xs-medium-uppercase' : 'system-xs-medium-uppercase')}> |
|
|
|
<span className='p-1'> |
|
|
|
pro |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</PremiumBadge> |
|
|
|
} |
|
|
|
if (plan === Plan.team) { |
|
|
|
return <div className='select-none'> |
|
|
|
<PremiumBadge size={size} color='indigo' allowHover={allowHover} onClick={onClick}> |
|
|
|
<div className={classNames(size === 's' ? 'system-2xs-medium-uppercase' : 'system-xs-medium-uppercase')}> |
|
|
|
<span className='p-1'> |
|
|
|
{plan} |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</PremiumBadge> |
|
|
|
</div> |
|
|
|
return <PremiumBadge className='select-none' size={size} color='indigo' allowHover={allowHover} onClick={onClick}> |
|
|
|
<div className={classNames(size === 's' ? 'system-2xs-medium-uppercase' : 'system-xs-medium-uppercase')}> |
|
|
|
<span className='p-1'> |
|
|
|
{plan} |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</PremiumBadge> |
|
|
|
} |
|
|
|
return null |
|
|
|
} |