passing penDetected to ShapesSwitcher

This commit is contained in:
Zsolt Viczian 2022-03-20 17:40:25 +01:00
parent 24d7380333
commit 15d88d0fe0
3 changed files with 4 additions and 1 deletions

View File

@ -186,14 +186,15 @@ export const ShapesSwitcher = ({
setAppState, setAppState,
onImageAction, onImageAction,
appState, appState,
penDetected,
}: { }: {
canvas: HTMLCanvasElement | null; canvas: HTMLCanvasElement | null;
elementType: AppState["elementType"]; elementType: AppState["elementType"];
setAppState: React.Component<any, AppState>["setState"]; setAppState: React.Component<any, AppState>["setState"];
onImageAction: (data: { pointerType: PointerType | null }) => void; onImageAction: (data: { pointerType: PointerType | null }) => void;
appState: AppState; appState: AppState;
penDetected: boolean;
}) => { }) => {
const penDetected = useDeviceType().penDetected;
return ( return (
<> <>
{SHAPES.map(({ value, icon, key }, index) => { {SHAPES.map(({ value, icon, key }, index) => {

View File

@ -352,6 +352,7 @@ const LayerUI = ({
insertOnCanvasDirectly: pointerType !== "mouse", insertOnCanvasDirectly: pointerType !== "mouse",
}); });
}} }}
penDetected={deviceType.penDetected}
/> />
</Stack.Row> </Stack.Row>
</Island> </Island>

View File

@ -83,6 +83,7 @@ export const MobileMenu = ({
insertOnCanvasDirectly: pointerType !== "mouse", insertOnCanvasDirectly: pointerType !== "mouse",
}); });
}} }}
penDetected={deviceType.penDetected}
/> />
</Stack.Row> </Stack.Row>
</Island> </Island>