import React, { useContext } from 'react'
import { Divider, ConfigProvider } from 'antd'
import styles from './index.less'

const Header = (props) => {

  // const { getPrefixCls } = useContext(ConfigProvider.ConfigContext)
  // const prefixCls = getPrefixCls('pandaXform')

  const { title, value } = props

  return (
    <div className={styles.object}>
      {
        title ? (
          <div className={styles.title}>
            <i className={styles.bg}></i>
            <span style={{ fontWeight: 'bold', fontSize: '15px' }}>{title}</span>
          </div>
        ) : null
      }
      {props.children}
      {title && props.children ? <div className={styles.line}></div> : null}
    </div>
  )

}

export default Header