File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
examples/vite-3DCanvas-react-app/src/components/toolbar Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 11import React from "react" ;
22import { 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" ;
47import { RootState } from "@react-three/fiber" ;
58
69const 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 ) {
You can’t perform that action at this time.
0 commit comments