import * as React from 'react' import { StyledHeadingTitle, StyledHeadingTitleLabel, StyledSectionHeading, StyledFeatureHeading, StyledH1, StyledH2, StyledH3, StyledH4, StyledH5, StyledH6 } from './style' export interface TitleHeadingProps { id?: string text?: string label?: string } class TitleHeading extends React.PureComponent { render () { const { id, text, label } = this.props return ( {text} { label ? {label} : null } ) } } export interface SectionHeadingProps { id?: string text?: string } class SectionHeading extends React.PureComponent { render () { const { id, text } = this.props return ( {text} ) } } export interface FeatureHeadingProps { id?: string text?: string } class FeatureHeading extends React.PureComponent { render () { const { id, text } = this.props return ( {text} ) } } export interface HeadingTheme { color?: string fontFamily?: string fontWeight?: string margin?: string } export interface HeadingProps { id?: string level?: 1 | 2 | 3 | 4 | 5 | 6 text?: string customStyle?: HeadingTheme } class Heading extends React.PureComponent { render () { const { id, level, customStyle, text } = this.props switch (level) { case 1: return {text} case 2: return {text} case 3: return {text} case 4: return {text} case 5: return {text} case 6: return {text} default: return {text} } } } export { TitleHeading, // to be used as a page's title SectionHeading, // the main title covering one/more features FeatureHeading, // to be used as a feature title Heading // general heading styles ranging from 1-6 }