2025-07-22 11:58:10 -07:00
|
|
|
import { useSlotRecipe, chakra } from "@chakra-ui/react"
|
|
|
|
|
|
2025-07-21 13:01:16 -07:00
|
|
|
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>
|
|
|
|
|
);
|
|
|
|
|
}
|
2025-07-21 13:01:16 -07:00
|
|
|
|