import * as React from 'react';
import { Props, State } from './type';
import * as Styled from './index.style'

export class LofterTitle extends React.Component<Props, State> {
  public static defaultProps = new Props();
  public state = new State();
  
  public render() {
    let { style, title, marginTop } = this.props
    return <Styled.TitleContainer style={style}>
      <div className={marginTop && 'f-before'} >
        <div className="title-wrap" style={{marginTop: `${marginTop}rem`}}>
          <span className="line"></span>
          <span className="title-content">
            {title}
          </span>
          <span className="line"></span>
        </div>
      </div>
    </Styled.TitleContainer>
  }
}
