Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/mayask/ink-react. Declarative email templates using react.js and ink.css
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233
import React from 'react'
export class InkComponent extends React.Component { renderInk() { throw new Error('must override this method') }
renderChildren() { var result = this.props.children if (this.props.center) { result = ( <center> {React.Children.map(result, (child) => { if (React.isValidElement(child)) { child = React.cloneElement(child, { 'center': this.props.center }) } return child })} </center> ) } return result }
/* Do not override this method. Use `renderInk` instead */ render() { return this.renderInk() }}