import { View, Block } from '@tarojs/components'
import './index.scss'
import NamedIcon from '../../components/NamedIcon'

export default function (props) {
  const disable = props.disable ? 'disable' : ''
  console.log('------->', props)

  return (
    <Block>
      {
        !props.hide && <View className={`raiseCell ${disable}`}>
          <View className="row">
            <View className="head">{props.head}</View>
            <View className="body">{props.body}</View>
            <View className="action" onClick={props.onActionClick}>
              {
                props.action && (<Image src={require('../../assets/copy.png')} style="width:34rpx;height:34rpx"></Image>)
              }
            </View>
          </View>
          {
            props.desc &&
            (
              <View className="row desc">
                <View className="desc">{props.desc}</View>
              </View>
            )
          }
        </View>
      }
    </Block>
  )
}
