toggle styled but no functionality

This commit is contained in:
yousifpa98
2024-12-21 12:16:24 +01:00
parent 6e257453bf
commit 9d7c2b2109
8 changed files with 116 additions and 15 deletions

View File

@@ -0,0 +1,16 @@
import React, { useState } from "react";
import "../../css/Toggle.css";
const Toggle = () => {
const [toggled, setToggled] = useState(false);
return (
<button
className={`toggle-btn ${toggled ? "toggled" : ""}`}
onClick={() => setToggled(!toggled)}
>
<div className="thumb"></div>
</button>
);
};
export default Toggle;