index.js 843 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import React from 'react';
  2. import Module from '../../lib/Module';
  3. import { View , StyleSheet , Text} from 'react-native';
  4. import Types from '../../lib/Types';
  5. import {Icon} from 'react-native-elements'
  6. export default class IconComp extends Module{
  7. constructor(props){
  8. super(props)
  9. }
  10. press(e){
  11. console.log("######You must over write this function@@@@@")
  12. }
  13. display(){
  14. return(
  15. <View>
  16. <Icon
  17. name = {this.props.name}
  18. type = {this.props.type}
  19. color = {this.props.color}
  20. onPress = {(e) => this.press(e)}/>
  21. </View>)
  22. }
  23. }
  24. IconComp.Inputs = {
  25. name: new Types.Text().require().default("bookmark"),
  26. color: new Types.Text().require().color().default('rgba(112, 112, 112, 1)'),
  27. type: new Types.Text().require().default('material'),
  28. width: new Types.Integer().require(),
  29. height: new Types.Integer().require()
  30. }