import * as React from 'react'
import * as cx from 'classnames'

import { DividerProps } from '../interfaces'

const styles = require('../../src/styles/components/divider.scss')
const borders = require('../../src/styles/common/borders.scss')

export class Divider extends React.Component<DividerProps, any> {
    public render(): JSX.Element {
        return (
            <div className={this.classNames()} />
        )
    }

    private classNames(): string {
        const {
            dotted,
            vertical,
        } = this.props

        return cx(
            this.props.className,
            dotted ? borders.dotted : borders.light,
            vertical ? styles.y : styles.x,
        )
    }
}
