import React from 'react'
import classNames from 'classnames'
import { string, node, object, array, oneOfType } from 'prop-types'

const Caption = ({ children, className }) => (
  <caption className={classNames('sw-table-caption', className)}>{children}</caption>
)

Caption.displayName = 'Caption'

Caption.propTypes = {
  /** Component children */
  children: oneOfType([string, node]),
  /** Custom className */
  className: oneOfType([string, object, array])
}

export default Caption
