diff --git a/stories/Components/UIcomponents/Buttons/Switch/Switch.jsx b/stories/Components/UIcomponents/Buttons/Switch/Switch.jsx index 8fb0d1586..76e4ec664 100644 --- a/stories/Components/UIcomponents/Buttons/Switch/Switch.jsx +++ b/stories/Components/UIcomponents/Buttons/Switch/Switch.jsx @@ -19,6 +19,10 @@ export function Switch({ }) { const [toggled, setToggled] = useState(isToggled); + useEffect(() => { + setToggled(isToggled); + }, [isToggled]); + const handleToggle = () => { if (state !== 'disabled') { setToggled(!toggled);