import Widget from "../../../canvas/widgets/base" import TkinterBase from "./base" class Frame extends TkinterBase{ static widgetType = "frame" constructor(props) { super(props) this.droppableTags = { exclude: ["image", "video", "media", "toplevel", "main_window"] } } generateCode(variableName, parent){ const bg = this.getAttrValue("styling.backgroundColor") return [ `${variableName} = tk.Frame(master=${parent})`, `${variableName}.config(bg="${bg}")`, `${variableName}.${this.getLayoutCode()}` ] } componentDidMount(){ super.componentDidMount() this.setAttrValue("styling.backgroundColor", "#EDECEC") this.setWidgetName("frame") } renderContent(){ // console.log("widget styling: ", this.state.widgetInnerStyling) return (
{this.props.children}
) } } export default Frame