refactor: rename radius changer to tool settings
This commit is contained in:
parent
a68f995699
commit
60277da619
5 changed files with 10 additions and 10 deletions
|
|
@ -55,8 +55,8 @@ function ViewMenu() {
|
||||||
</MenubarCheckboxItem>
|
</MenubarCheckboxItem>
|
||||||
</MenubarSubContent>
|
</MenubarSubContent>
|
||||||
</MenubarSub>
|
</MenubarSub>
|
||||||
<MenubarCheckboxItem checked={settings.radiusChanger} onCheckedChange={onCheckedChange("radiusChanger")}>
|
<MenubarCheckboxItem checked={settings.toolSettings} onCheckedChange={onCheckedChange("toolSettings")}>
|
||||||
Radius Changer
|
Tool Settings
|
||||||
</MenubarCheckboxItem>
|
</MenubarCheckboxItem>
|
||||||
<MenubarCheckboxItem checked={settings.blockSelector} onCheckedChange={onCheckedChange("blockSelector")}>
|
<MenubarCheckboxItem checked={settings.blockSelector} onCheckedChange={onCheckedChange("blockSelector")}>
|
||||||
Block Selector
|
Block Selector
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { ToolContext } from "@/context/Tool";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { Label } from "@/components/ui/label";
|
import { Label } from "@/components/ui/label";
|
||||||
|
|
||||||
function Radius() {
|
function ToolSettings() {
|
||||||
const { radius, setRadius } = useContext(ToolContext);
|
const { radius, setRadius } = useContext(ToolContext);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -22,4 +22,4 @@ function Radius() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Radius;
|
export default ToolSettings;
|
||||||
|
|
@ -11,7 +11,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||||
import History from "./History";
|
import History from "./History";
|
||||||
import ColorPicker from "./ColorPicker";
|
import ColorPicker from "./ColorPicker";
|
||||||
import Replace from "./Replace";
|
import Replace from "./Replace";
|
||||||
import Radius from "./Radius";
|
import ToolSettings from "./ToolSettings";
|
||||||
import BlockSelector from "./BlockSelector";
|
import BlockSelector from "./BlockSelector";
|
||||||
|
|
||||||
function Sidebar() {
|
function Sidebar() {
|
||||||
|
|
@ -81,7 +81,7 @@ function Sidebar() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{(settings.historyPanel || settings.colorPicker || settings.blockReplacer || settings.radiusChanger || settings.blockSelector) && (
|
{(settings.historyPanel || settings.colorPicker || settings.blockReplacer || settings.toolSettings || settings.blockSelector) && (
|
||||||
<div
|
<div
|
||||||
style={{ width: `${width}px` }}
|
style={{ width: `${width}px` }}
|
||||||
className="w-72 border-l border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-2 pb-0 flex flex-col h-full gap-2 relative"
|
className="w-72 border-l border-zinc-200 dark:border-zinc-800 bg-white dark:bg-zinc-950 p-2 pb-0 flex flex-col h-full gap-2 relative"
|
||||||
|
|
@ -124,9 +124,9 @@ function Sidebar() {
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{settings.radiusChanger && (
|
{settings.toolSettings && (
|
||||||
<>
|
<>
|
||||||
<Radius />
|
<ToolSettings />
|
||||||
<Separator />
|
<Separator />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ const defaultSettings: Settings = {
|
||||||
historyPanel: true,
|
historyPanel: true,
|
||||||
colorPicker: true,
|
colorPicker: true,
|
||||||
blockReplacer: true,
|
blockReplacer: true,
|
||||||
radiusChanger: true,
|
toolSettings: true,
|
||||||
blockSelector: true,
|
blockSelector: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
2
src/types.d.ts
vendored
2
src/types.d.ts
vendored
|
|
@ -31,7 +31,7 @@ interface Settings {
|
||||||
historyPanel: boolean;
|
historyPanel: boolean;
|
||||||
colorPicker: boolean;
|
colorPicker: boolean;
|
||||||
blockReplacer: boolean;
|
blockReplacer: boolean;
|
||||||
radiusChanger: boolean;
|
toolSettings: boolean;
|
||||||
blockSelector: boolean;
|
blockSelector: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue