filters + fullscreen + components

This commit is contained in:
2024-04-27 18:30:04 +05:00
parent c26d766429
commit 17aea1fff1
27 changed files with 632 additions and 79 deletions
+25
View File
@@ -0,0 +1,25 @@
import { useState } from "react";
const Switch = () => {
const [isSwitched, setIsSwitched] = useState(false);
function handleOnClick() {
setIsSwitched((prev) => !prev);
}
return (
<div
className={`w-10 h-6 relative rounded-full cursor-pointer transition-all duration-300 ease-in-out ${
isSwitched ? "bg-[#00BED7]" : "bg-[#E2E2DC]"
}`}
onClick={handleOnClick}
>
<div
className={`w-5 h-5 bg-[#fff] rounded-full absolute transition-all duration-300 ease-in-out ${
isSwitched ? "top-[2px] left-[18px]" : "top-[2px] left-[2px]"
}`}
></div>
</div>
);
};
export default Switch;