import { ComponentClass } from 'react';
import Taro, { Component } from '@tarojs/taro';
import { View, Text, Image } from '@tarojs/components';

import comLogo from '../../../../images/order/pay_logo_icon@2x.png';
import './OrderTitle.scss';

type PageProps = {
  price: number;
};

interface OrderTitle {
  props: PageProps;
}
class OrderTitle extends Component {
  render() {
    const { price } = this.props;
    return (
      <View className='OrderTitle'>
        <View className='OrderTitle-name'>
          <Image className='OrderTitle-icon' src={comLogo} />
          <Text>成都多彩任意门科技有限公司</Text>
        </View>
        <View className='OrderTitle-price'>-{price ? price : ''}</View>
      </View>
    );
  }
}

export default OrderTitle as ComponentClass<PageProps>;
