{"size": 798, "ext": "js", "max_stars_repo_path": "src/client/src/ribbon/RibbonConfigured.js", "max_stars_repo_name": "bpmbox/googleappscript", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/client/src/ribbon/RibbonConfigured.js", "max_issues_repo_name": "bpmbox/googleappscript", "max_issues_repo_issues_event_min_datetime": "2021-11-11T21:35:03.000Z", "max_issues_repo_issues_event_max_datetime": "2021-11-11T21:43:27.000Z", "max_forks_repo_path": "src/client/src/ribbon/RibbonConfigured.js", "max_forks_repo_name": "bpmbox/googleappscript", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 28.5, "max_line_length": 85, "alphanum_fraction": 0.7243107769}
import React, { Component } from "react";
import PropTypes from "prop-types";
import { Ribbon as RibbonDHX, TreeCollection } from "dhx-suite";
import "dhx-suite/codebase/suite.min.css";
import "@mdi/font/css/materialdesignicons.min.css";

class RibbonConfigured extends Component {
	componentDidMount() {
		this.ribbon = new RibbonDHX(this.el, {
			css: "dhx_widget--bordered dhx_widget--bg_white",
		});
		this.ribbon.data.load(`${process.env.PUBLIC_URL}/static/ribbon.json`);
	}
	componentWillUnmount() {
		this.ribbon && this.ribbon.destructor();
	}
	render() {
		return <div ref={el => (this.el = el)}></div>;
	}
}

RibbonConfigured.propTypes = {
	css: PropTypes.string,
	data: PropTypes.instanceOf([PropTypes.array, PropTypes.instanceOf(TreeCollection)]),
};

export default RibbonConfigured;
