Files
Web-Frontend/client/src/components/layout/Canvas/Widget.jsx
T

22 lines
541 B
React
Raw Normal View History

2025-07-22 11:58:10 -07:00
import { useSlotRecipe, chakra } from "@chakra-ui/react"
export default function Widget({ title }) {
2025-07-22 11:58:10 -07:00
const recipe = useSlotRecipe({ key: "widget" });
const styles = recipe();
return (
2025-07-22 13:41:32 -07:00
<chakra.div >
2025-07-22 11:58:10 -07:00
<chakra.div css={styles.header}
className="widget-handle"
// style={{ padding: '4px', cursor: 'move', background: '#ddd' }}
>
{title}
</chakra.div>
<chakra.div css={styles.canvas}>
This is the widget content - drag or resize me!
</chakra.div>
</chakra.div>
);
}