feat: allows width and height to be passed through as props

This commit is contained in:
Mark Mankarious 2023-03-23 22:35:48 +00:00
parent c83452b3cb
commit f1f9c0f92b

View file

@ -12,9 +12,11 @@ import { useGlobalState } from "./hooks/useGlobalState";
interface Props {
initialScene: SceneI;
width?: number | string;
height: number | string;
}
const App = ({ initialScene }: Props) => {
const App = ({ initialScene, width, height }: Props) => {
const setInitialScene = useGlobalState((state) => state.setInitialScene);
useEffect(() => {
@ -26,8 +28,8 @@ const App = ({ initialScene }: Props) => {
<ModeManagerProvider>
<Box
sx={{
width: "100%",
height: "100%",
width: width ?? "100%",
height,
position: "relative",
overflow: "hidden",
}}