2024-09-22 22:24:35 +05:30
|
|
|
import Widget from "../../../canvas/widgets/base"
|
2024-09-25 17:27:12 +05:30
|
|
|
import TkinterBase from "./base"
|
2024-09-22 22:24:35 +05:30
|
|
|
|
|
|
|
|
|
2024-09-25 17:27:12 +05:30
|
|
|
class Frame extends TkinterBase{
|
2024-09-22 22:24:35 +05:30
|
|
|
|
|
|
|
|
static widgetType = "frame"
|
|
|
|
|
|
|
|
|
|
constructor(props) {
|
|
|
|
|
super(props)
|
|
|
|
|
|
|
|
|
|
this.droppableTags = {
|
2024-09-25 23:29:50 +05:30
|
|
|
exclude: ["image", "video", "media", "toplevel"]
|
2024-09-22 22:24:35 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.state = {
|
|
|
|
|
...this.state,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount(){
|
|
|
|
|
super.componentDidMount()
|
|
|
|
|
this.setAttrValue("styling.backgroundColor", "#EDECEC")
|
|
|
|
|
this.setWidgetName("frame")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
renderContent(){
|
2024-09-25 17:27:12 +05:30
|
|
|
// console.log("widget styling: ", this.state.widgetInnerStyling)
|
2024-09-22 22:24:35 +05:30
|
|
|
return (
|
2024-09-24 21:49:26 +05:30
|
|
|
<div className="tw-w-flex tw-flex-col tw-w-full tw-h-full tw-relative tw-rounded-md tw-overflow-hidden">
|
2024-09-25 17:27:12 +05:30
|
|
|
<div className="tw-p-2 tw-w-full tw-h-full tw-content-start" style={this.state.widgetInnerStyling}>
|
2024-09-22 22:24:35 +05:30
|
|
|
{this.props.children}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default Frame
|