import React from 'react' import { fontSizes, margins } from '../config/scales' class Heading extends React.Component { static propTypes = { level: React.PropTypes.number.isRequired, style: React.PropTypes.object, } render() { const headingProps = { style: { fontWeight: 400, fontSize: fontSizes[this.props.level - 1], marginBottom: margins[1], ...this.props.style } } switch(this.props.level) { case 1: return

{this.props.children}

case 2: return

{this.props.children}

case 3: return

{this.props.children}

case 4: return

{this.props.children}

case 5: return
{this.props.children}
default: return
{this.props.children}
} } } export default Heading