diff --git a/src/components/editing-section.tsx b/src/components/editing-section.tsx index 8bc9d43..b450a60 100644 --- a/src/components/editing-section.tsx +++ b/src/components/editing-section.tsx @@ -7,7 +7,8 @@ import { HexColorPicker } from "react-colorful"; import IconsDialog from "./icons-dialog"; import ColorPicker from "./color-picker"; -import { UploadIcon } from "lucide-react"; +import { UploadIcon, RotateCcwIcon } from "lucide-react"; +import { Tooltiper } from "./tooltiper"; type ControlProps = { label: string; @@ -15,14 +16,38 @@ type ControlProps = { type ControlGroupProps = ControlProps & { children: React.ReactNode; + rester?: () => void; }; -const ControlGroup: React.FC = ({ children, label }) => ( -
- - {children} -
-); +const ControlGroup: React.FC = ({ + children, + label, + rester +}) => { + function handleValueReset() { + if (rester) rester(); + } + + return ( +
+
+ + {rester && ( + + + + )} +
+ {children} +
+ ); +}; type ControlSliderProps = ControlProps & React.ComponentPropsWithoutRef; @@ -242,7 +267,10 @@ function IconControlGroup() { onValueChange={(value) => updateSvgSetting("scale", value[0])} /> - + updateSvgSetting("position", { x: 0, y: 0 })} + > - + { + updateSvgSetting("skewX", 0); + updateSvgSetting("skewY", 0); + }} + >