Skip to content

Commit

Permalink
add eraser component
Browse files Browse the repository at this point in the history
  • Loading branch information
deveshidwivedi committed Jun 27, 2024
1 parent a5e1d6b commit 039c431
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions modules/room/components/toolbar/Eraser.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { useOptions, useSetOptions } from "@/common/recoil/options";
import {FaEraser} from "react-icons/fa";

const Eraser = () => {
//may cause error
const options = useOptions();
const setOptions = useSetOptions();
return (
<button
className={`text-xl ${options.erase && "bg-blue-400"}`}
onClick={()=> {
setOptions((prev)=> ({...prev, erase: !prev.erase}))
}}
>
<FaEraser />
</button>
);
};

export default Eraser;

0 comments on commit 039c431

Please sign in to comment.