@datawheel/canon-core
Version:
Reusable React environment and components for creating visualization engines.
24 lines (17 loc) • 400 B
JSX
import React, {Component} from "react";
import PropTypes from "prop-types";
class CanonProfile extends Component {
getChildContext() {
return {
topics: this.props.topics || []
};
}
render() {
const {children} = this.props;
return <div id="CanonProfile">{ children }</div>;
}
}
CanonProfile.childContextTypes = {
topics: PropTypes.array
};
export {CanonProfile};