widgets are bound to container
figured out how to set bounds so widgets don't go off screen!
This commit is contained in:
@@ -49,6 +49,26 @@ const sidebarRecipe = defineSlotRecipe({
|
||||
}
|
||||
});
|
||||
|
||||
const widgetRecipe = defineSlotRecipe({
|
||||
slots: ["root", "header", "canvas"],
|
||||
base: {
|
||||
root: {
|
||||
bg: "base100",
|
||||
borderRadius: "md",
|
||||
p: "1"
|
||||
},
|
||||
header: {
|
||||
bg: "base100",
|
||||
cursor: "move",
|
||||
borderRadius: "md"
|
||||
},
|
||||
canvas: {
|
||||
bg: "base100",
|
||||
cursor: "default"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const config = defineConfig({
|
||||
theme: {
|
||||
semanticTokens: {
|
||||
@@ -82,6 +102,7 @@ const config = defineConfig({
|
||||
},
|
||||
slotRecipes: {
|
||||
sidebar: sidebarRecipe,
|
||||
widget: widgetRecipe,
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user