Skip to content

Commit 1458853

Browse files
committed
GEP-200 Fix bad typing for the Toolbar3D
1 parent d2f0cde commit 1458853

File tree

1 file changed

+8
-3
lines changed
  • examples/vite-3DCanvas-react-app/src/components/toolbar

1 file changed

+8
-3
lines changed

examples/vite-3DCanvas-react-app/src/components/toolbar/Toolbar3D.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import React from "react";
22
import { Box, SxProps, Theme, Divider } from "@mui/material";
3-
import { useFiber } from "@metacell/geppetto-meta-ui/3d-canvas/Canvas3D";
3+
import {
4+
Canvas3DRootState,
5+
useFiber,
6+
} from "@metacell/geppetto-meta-ui/3d-canvas/Canvas3D";
47
import { RootState } from "@react-three/fiber";
58

69
const toolbarBaseStyles: SxProps<Theme> = {
@@ -57,14 +60,16 @@ export const Toolbar3DButton = ({
5760
}: {
5861
icon: React.ReactNode;
5962
tooltip: string;
60-
onClick: (fiber: RootState) => void;
63+
onClick: (fiber: Canvas3DRootState) => void;
6164
style?: React.CSSProperties;
6265
active?: boolean;
6366
}) => {
6467
const canvasId = useCanvasId();
6568
const fiber = useFiber(canvasId ?? "default");
6669

67-
const buttonStyle = active ? toolbarButtonActiveStyles : toolbarButtonBaseStyles;
70+
const buttonStyle = active
71+
? toolbarButtonActiveStyles
72+
: toolbarButtonBaseStyles;
6873

6974
const handleClick = () => {
7075
if (fiber) {

0 commit comments

Comments
 (0)