import { ComponentClass } from 'react'
import Taro, { Component } from '@tarojs/taro'
import { View } from '@tarojs/components'
import './index.scss'

type PageOwnProps = {
  className?: string
  content: any
  title: any
}


type IProps = PageOwnProps

interface Index {
  props: IProps;
}

class Index extends Component {


  static options = {
    addGlobalClass: true
  }

  render() {
    const { title, content } = this.props
    return (
      <View className={'sd-summary ' + (this.props.className || '')}>
        <View className='sd-summary-title'>{title}</View>
        <View className='sd-summary-content'>{content}</View>
      </View>
    )
  }
}

export default Index as ComponentClass<PageOwnProps>