📅  最后修改于: 2022-03-11 15:02:06.941000             🧑  作者: Mango
import { Switch } from '@chakra-ui/react';
const defaultSwitchValue = true;
const [sameAddressSwitch, setSameAddressSwitch] = useState(defaultSwitchValue);
const handleSwitchOnChange = () => {
const newValue = !sameAddressSwitch;
setSameAddressSwitch(newValue);
};
return (
);