const React = require("react"); const { Surface, Image, Text } = require("react-canvas"); const styles = { demospan1: { top: 0, left: 0, width: 256, textAlign: "center", color: "#f16", fontWeight: "400", fontSize: 24, letterSpacing: 0 }, demospan2: { bottom: 4, left: 0, top: 0, width: 256, textAlign: "center", color: "#7bf", fontWeight: "300", fontSize: 32, letterSpacing: -1 } }; class ReactCanvasContentExample extends React.Component { render () { // This component is waiting https://github.com/Flipboard/react-canvas/issues/108 to be fixed. const { width, height, text } = this.props; return Throw me to the wolves {text} ; } } module.exports = ReactCanvasContentExample;