import * as React from 'react'
import * as cx from 'classnames'
import { StylableComponent } from '../../theme'
import { TextProps } from '../interfaces'
import { BaseText } from '../base'

const styles = require('../../../../src/components/text/web/text.scss')

export class Text extends BaseText<TextProps> {

    public render() {
        const { children, inline, id } = this.props

        const childProps: any = {
            id,
            className: this.classNames(),
            style: this.styles(),
        }

        return inline
            ? <span {...childProps}>{children}</span >
            : <p {...childProps}>{children}</p>

    }
}
