- minor improvements to painter
This commit is contained in:
@@ -3,15 +3,16 @@ import { Tab, Tabs, TabList, TabPanel } from "react-tabs";
|
||||
import "react-tabs/style/react-tabs.css";
|
||||
import RegionSelector from "./RegionSelector";
|
||||
import type { Region } from "../../../../types/types";
|
||||
import { useState } from "react";
|
||||
|
||||
type CameraSettingsProps = {
|
||||
regions: Region[];
|
||||
selectedRegionIndex: number;
|
||||
onSelectRegion: (index: number) => void;
|
||||
onChangeRegionColour: (index: number, colour: string) => void;
|
||||
isErasing: boolean;
|
||||
onSelectErasing: (isErasing: boolean) => void;
|
||||
mode: string;
|
||||
onSelectMode: (mode: string) => void;
|
||||
setTabIndex: (tabIndex: number) => void;
|
||||
tabIndex: number;
|
||||
};
|
||||
|
||||
const CameraSettings = ({
|
||||
@@ -19,10 +20,11 @@ const CameraSettings = ({
|
||||
selectedRegionIndex,
|
||||
onSelectRegion,
|
||||
onChangeRegionColour,
|
||||
isErasing,
|
||||
onSelectErasing,
|
||||
mode,
|
||||
onSelectMode,
|
||||
tabIndex,
|
||||
setTabIndex,
|
||||
}: CameraSettingsProps) => {
|
||||
const [tabIndex, setTabIndex] = useState(0);
|
||||
return (
|
||||
<Card className="p-4 max-h-screen col-span-3">
|
||||
<Tabs
|
||||
@@ -42,8 +44,8 @@ const CameraSettings = ({
|
||||
selectedRegionIndex={selectedRegionIndex}
|
||||
onSelectRegion={onSelectRegion}
|
||||
onChangeRegionColour={onChangeRegionColour}
|
||||
isErasing={isErasing}
|
||||
onSelectErasing={onSelectErasing}
|
||||
mode={mode}
|
||||
onSelectMode={onSelectMode}
|
||||
/>
|
||||
</TabPanel>
|
||||
<TabPanel>
|
||||
|
||||
Reference in New Issue
Block a user