feat: added basic tkinter widgets
This commit is contained in:
40
src/frameworks/tkinter/widgets/frame.js
Normal file
40
src/frameworks/tkinter/widgets/frame.js
Normal 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
|
||||
Reference in New Issue
Block a user