refactor(web): make Switch controlled-only and migrate call sites (#32399)

This commit is contained in:
yyh
2026-02-18 23:47:07 +08:00
committed by GitHub
parent 368db04519
commit ea0e1b52a8
58 changed files with 182 additions and 223 deletions

View File

@ -24,12 +24,12 @@ const PlanRangeSwitcher: FC<PlanRangeSwitcherProps> = ({
<div className="flex items-center justify-end gap-x-3 pr-5">
<Switch
size="l"
defaultValue={value === PlanRange.yearly}
value={value === PlanRange.yearly}
onChange={(v) => {
onChange(v ? PlanRange.yearly : PlanRange.monthly)
}}
/>
<span className="system-md-regular text-text-tertiary">
<span className="text-text-tertiary system-md-regular">
{t('plansCommon.annualBilling', { ns: 'billing', percent: 17 })}
</span>
</div>