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 14:55:28 -07:00
|
|
|
<chakra.div className="react-resizable-handle-se">
|
|
|
|
|
<chakra.div css={styles.header} className="widget-handle" >
|
2025-07-22 11:58:10 -07:00
|
|
|
{title}
|
|
|
|
|
</chakra.div>
|
2025-07-22 14:55:28 -07:00
|
|
|
<chakra.div css={styles.canvas} >
|
2025-07-22 11:58:10 -07:00
|
|
|
This is the widget content - drag or resize me!
|
|
|
|
|
</chakra.div>
|
|
|
|
|
</chakra.div>
|
|
|
|
|
);
|
|
|
|
|
}
|
2025-07-21 13:01:16 -07:00
|
|
|
|