sets canvas zindex behind sidebar/header

This commit is contained in:
2025-07-28 13:32:03 -07:00
parent f312730e35
commit eae9bc4048
3 changed files with 14 additions and 3 deletions
@@ -2,7 +2,7 @@
// the main canvas section of the web App with a default state // the main canvas section of the web App with a default state
// of 'WidgetCanvas' // of 'WidgetCanvas'
import { Box } from "@chakra-ui/react"; import { Box, useRecipe } from "@chakra-ui/react";
import GlobalMapCanvas from "./views/GlobalMapCanvas"; import GlobalMapCanvas from "./views/GlobalMapCanvas";
import RegionalMapCanvas from "./views/RegionalMapCanvas"; import RegionalMapCanvas from "./views/RegionalMapCanvas";
import VolcanoCanvas from "./views/VolcanoCanvas"; import VolcanoCanvas from "./views/VolcanoCanvas";
@@ -10,6 +10,9 @@ import AdminCanvas from "./views/AdminCanvas";
import { DashboardCanvas } from "./views/DashboardCanvas"; import { DashboardCanvas } from "./views/DashboardCanvas";
export default function Canvas({ view, layout, setLayout, onLayoutChange }) { export default function Canvas({ view, layout, setLayout, onLayoutChange }) {
const recipe = useRecipe({ key: "canvas" });
const styles = recipe();
return ( return (
<Box height="100%" width="100%"> <Box height="100%" width="100%">
{view === "widget" && {view === "widget" &&
+1 -1
View File
@@ -6,7 +6,7 @@ import { Grid, GridItem, useRecipe } from '@chakra-ui/react';
import { useState } from 'react'; import { useState } from 'react';
export default function Dashboard() { export default function Dashboard() {
const recipe = useRecipe({ key: "canvas" }); const recipe = useRecipe({ key: "dashboard" });
const styles = recipe(); const styles = recipe();
// Lifted State - defaults to widget dashboard // Lifted State - defaults to widget dashboard
+9 -1
View File
@@ -16,12 +16,19 @@ const headerRecipe = defineRecipe({
} }
}); });
const canvasRecipe = defineRecipe({ const dashboardRecipe = defineRecipe({
base: { base: {
bg: "{base200}" bg: "{base200}"
} }
}); });
const canvasRecipe = defineRecipe({
base: {
bg: "{base200}",
zIndex: "-1"
}
});
const sidebarRecipe = defineSlotRecipe({ const sidebarRecipe = defineSlotRecipe({
slots: ["root", "close_button", "buttons", "dark_mode_button"], slots: ["root", "close_button", "buttons", "dark_mode_button"],
base: { base: {
@@ -111,6 +118,7 @@ const config = defineConfig({
}, },
recipes: { recipes: {
header: headerRecipe, header: headerRecipe,
dashboard: dashboardRecipe,
canvas: canvasRecipe, canvas: canvasRecipe,
}, },
slotRecipes: { slotRecipes: {