mirror of
https://github.com/r2r90/canvas-label.git
synced 2025-12-18 12:35:49 +00:00
adding canvas size button to sidebar - without fonctionality
This commit is contained in:
@@ -1,5 +1,32 @@
|
||||
import React from "react";
|
||||
import { DeleteShapeButton } from "@/components/delete-shape-button";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { TbFlipHorizontal, TbFlipVertical } from "react-icons/tb";
|
||||
import { Toggle } from "@/components/ui/toggle";
|
||||
import { useAppDispatch } from "@/hooks";
|
||||
import { updateImage } from "@/store/app.slice";
|
||||
|
||||
export function ImageToolbar() {
|
||||
return <div>Image toolbar</div>;
|
||||
export function ImageToolbar({ selectedItemId, currentImage }) {
|
||||
const dispatch = useAppDispatch();
|
||||
const flipImageVerticaly = (selectedItemId) => {
|
||||
dispatch(
|
||||
updateImage({
|
||||
id: selectedItemId,
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
const flipImageHorizontaly = () => {
|
||||
console.log("Horizontal Flip");
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<Toggle onClick={flipImageVerticaly}>
|
||||
<TbFlipVertical />
|
||||
</Toggle>
|
||||
<Toggle>
|
||||
<TbFlipHorizontal onClick={flipImageHorizontaly} />
|
||||
</Toggle>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user