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>
|
||||
</MenubarSubContent>
|
||||
</MenubarSub>
|
||||
<MenubarCheckboxItem checked={settings.radiusChanger} onCheckedChange={onCheckedChange("radiusChanger")}>
|
||||
Radius Changer
|
||||
<MenubarCheckboxItem checked={settings.toolSettings} onCheckedChange={onCheckedChange("toolSettings")}>
|
||||
Tool Settings
|
||||
</MenubarCheckboxItem>
|
||||
<MenubarCheckboxItem checked={settings.blockSelector} onCheckedChange={onCheckedChange("blockSelector")}>
|
||||
Block Selector
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { ToolContext } from "@/context/Tool";
|
|||
import { Input } from "@/components/ui/input";
|
||||
import { Label } from "@/components/ui/label";
|
||||
|
||||
function Radius() {
|
||||
function ToolSettings() {
|
||||
const { radius, setRadius } = useContext(ToolContext);
|
||||
|
||||
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 ColorPicker from "./ColorPicker";
|
||||
import Replace from "./Replace";
|
||||
import Radius from "./Radius";
|
||||
import ToolSettings from "./ToolSettings";
|
||||
import BlockSelector from "./BlockSelector";
|
||||
|
||||
function Sidebar() {
|
||||
|
|
@ -81,7 +81,7 @@ function Sidebar() {
|
|||
|
||||
return (
|
||||
<>
|
||||
{(settings.historyPanel || settings.colorPicker || settings.blockReplacer || settings.radiusChanger || settings.blockSelector) && (
|
||||
{(settings.historyPanel || settings.colorPicker || settings.blockReplacer || settings.toolSettings || settings.blockSelector) && (
|
||||
<div
|
||||
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"
|
||||
|
|
@ -124,9 +124,9 @@ function Sidebar() {
|
|||
</>
|
||||
)}
|
||||
|
||||
{settings.radiusChanger && (
|
||||
{settings.toolSettings && (
|
||||
<>
|
||||
<Radius />
|
||||
<ToolSettings />
|
||||
<Separator />
|
||||
</>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ const defaultSettings: Settings = {
|
|||
historyPanel: true,
|
||||
colorPicker: true,
|
||||
blockReplacer: true,
|
||||
radiusChanger: true,
|
||||
toolSettings: true,
|
||||
blockSelector: true,
|
||||
};
|
||||
|
||||
|
|
|
|||
2
src/types.d.ts
vendored
2
src/types.d.ts
vendored
|
|
@ -31,7 +31,7 @@ interface Settings {
|
|||
historyPanel: boolean;
|
||||
colorPicker: boolean;
|
||||
blockReplacer: boolean;
|
||||
radiusChanger: boolean;
|
||||
toolSettings: boolean;
|
||||
blockSelector: boolean;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue