mirror of
https://github.com/markmanx/isoflow.git
synced 2025-02-08 04:18:29 +00:00
feat: allows width and height to be passed through as props
This commit is contained in:
parent
c83452b3cb
commit
f1f9c0f92b
1 changed files with 5 additions and 3 deletions
|
@ -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",
|
||||
}}
|
||||
|
|
Loading…
Reference in a new issue