From 9b5a83e6326b97d031f12eaf37fc5b82f53ffd51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Flatval?= Date: Mon, 9 Sep 2024 16:28:01 +0200 Subject: [PATCH] chore: move out viewer provider props into its own type --- .../src/components/RevealCanvas/ViewerContext.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/react-components/src/components/RevealCanvas/ViewerContext.tsx b/react-components/src/components/RevealCanvas/ViewerContext.tsx index 985d4ea677f..9a7f61ddce9 100644 --- a/react-components/src/components/RevealCanvas/ViewerContext.tsx +++ b/react-components/src/components/RevealCanvas/ViewerContext.tsx @@ -8,17 +8,19 @@ import { type CameraStateParameters, useCameraStateControl } from './hooks/useCa const ViewerContext = createContext(null); +export type ViewerContextProviderProps = { + cameraState?: CameraStateParameters; + setCameraState?: (cameraState?: CameraStateParameters) => void; + value: RevealRenderTarget | null; + children: ReactNode; +}; + export const ViewerContextProvider = ({ cameraState, setCameraState, value, children -}: { - cameraState?: CameraStateParameters; - setCameraState?: (cameraState?: CameraStateParameters) => void; - value: RevealRenderTarget | null; - children: ReactNode; -}): ReactElement => { +}: ViewerContextProviderProps): ReactElement => { return (