feat: added basic tkinter widgets

This commit is contained in:
paul
2024-09-22 22:24:35 +05:30
parent 65d7aec1a2
commit 1b9e049d91
9 changed files with 704 additions and 169 deletions

View File

@@ -0,0 +1,40 @@
import Widget from "../../../canvas/widgets/base"
class Frame extends Widget{
static widgetType = "frame"
constructor(props) {
super(props)
this.droppableTags = {
exclude: ["image", "video", "media"]
}
this.state = {
...this.state,
}
}
componentDidMount(){
super.componentDidMount()
this.setAttrValue("styling.backgroundColor", "#EDECEC")
this.setWidgetName("frame")
}
renderContent(){
return (
<div className="tw-w-flex tw-flex-col tw-w-full tw-h-full tw-rounded-md tw-overflow-hidden">
<div className="tw-p-2 tw-w-full tw-h-full tw-content-start" style={this.state.widgetStyling}>
{this.props.children}
</div>
</div>
)
}
}
export default Frame