Merge branch 'add/widgets/theme' into 'main'
widget overflow now scrolls See merge request vkuchenik/website-framework!20
This commit is contained in:
@@ -19,6 +19,12 @@ function App() {
|
|||||||
opacity: 1 !important;
|
opacity: 1 !important;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.react-resizable-handle-se {
|
||||||
|
position: sticky;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
`}
|
`}
|
||||||
/>
|
/>
|
||||||
<Grid css={styles}
|
<Grid css={styles}
|
||||||
|
|||||||
@@ -5,14 +5,11 @@ export default function Widget({ title }) {
|
|||||||
const styles = recipe();
|
const styles = recipe();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<chakra.div >
|
<chakra.div className="react-resizable-handle-se">
|
||||||
<chakra.div css={styles.header}
|
<chakra.div css={styles.header} className="widget-handle" >
|
||||||
className="widget-handle"
|
|
||||||
// style={{ padding: '4px', cursor: 'move', background: '#ddd' }}
|
|
||||||
>
|
|
||||||
{title}
|
{title}
|
||||||
</chakra.div>
|
</chakra.div>
|
||||||
<chakra.div css={styles.canvas}>
|
<chakra.div css={styles.canvas} >
|
||||||
This is the widget content - drag or resize me!
|
This is the widget content - drag or resize me!
|
||||||
</chakra.div>
|
</chakra.div>
|
||||||
</chakra.div>
|
</chakra.div>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export default function WidgetCanvas() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<chakra.div height="100%" width="100%">
|
<chakra.div width="100%">
|
||||||
<ResponsiveGridLayout
|
<ResponsiveGridLayout
|
||||||
className="layout"
|
className="layout"
|
||||||
layout={layout}
|
layout={layout}
|
||||||
@@ -49,7 +49,7 @@ export default function WidgetCanvas() {
|
|||||||
onDragStop={handleDragStop}
|
onDragStop={handleDragStop}
|
||||||
>
|
>
|
||||||
{layout.map((item) => (
|
{layout.map((item) => (
|
||||||
<chakra.div key={item.i} css={styles.root}>
|
<chakra.div key={item.i} css={styles.root} >
|
||||||
<Widget title="VDAP Widget" />
|
<Widget title="VDAP Widget" />
|
||||||
</chakra.div>
|
</chakra.div>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ const widgetRecipe = defineSlotRecipe({
|
|||||||
border: "1px solid",
|
border: "1px solid",
|
||||||
borderColor: "{base300}",
|
borderColor: "{base300}",
|
||||||
textAlign: "center",
|
textAlign: "center",
|
||||||
|
overflow: "auto"
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
bg: "base100",
|
bg: "base100",
|
||||||
|
|||||||
Reference in New Issue
Block a user