fix: change Switch.props.ref to optional prop to align with OriginalSwitch (#17443)

This commit is contained in:
yusheng chen 2025-04-05 14:56:54 +08:00 committed by GitHub
parent 6efa882ca3
commit dc9194ca00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,7 +20,7 @@ const Switch = (
disabled = false, disabled = false,
className, className,
}: SwitchProps & { }: SwitchProps & {
ref: React.RefObject<HTMLButtonElement>; ref?: React.RefObject<HTMLButtonElement>;
}, },
) => { ) => {
const [enabled, setEnabled] = useState(defaultValue) const [enabled, setEnabled] = useState(defaultValue)