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

type PageOwnProps = {
  icon: string;
  text: string;
  onClick: () => void;
};

interface MenuIconNormal {
  props: PageOwnProps;
}
class MenuIconNormal extends Component<PageOwnProps> {
  render() {
    const { icon, text, onClick } = this.props;
    return (
      <View className='MenuIconNormal' onClick={onClick}>
        <Image className='icon' src={icon} />
        <Text className='text'>{text}</Text>
      </View>
    );
  }
}

export default MenuIconNormal as ComponentClass<PageOwnProps>;
