# All files / helpers getIconType.js

41.67% Statements 5/12
36.36% Branches 4/11
100% Functions 1/1
41.67% Lines 5/12

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38

    6x

    1x

    1x

    2x

    2x

     import ZocialIcon from 'react-native-vector-icons/Zocial';
    import OcticonIcon from 'react-native-vector-icons/Octicons';
    import MaterialIcon from 'react-native-vector-icons/MaterialIcons';
    import MaterialCommunityIcon from 'react-native-vector-icons/MaterialCommunityIcons';
    import Ionicon from 'react-native-vector-icons/Ionicons';
    import FoundationIcon from 'react-native-vector-icons/Foundation';
    import EvilIcon from 'react-native-vector-icons/EvilIcons';
    import EntypoIcon from 'react-native-vector-icons/Entypo';
    import FAIcon from 'react-native-vector-icons/FontAwesome';
    import SimpleLineIcon from 'react-native-vector-icons/SimpleLineIcons';

    export default (type) => {
      switch (type) {
        case 'zocial':
          return ZocialIcon;
        case 'octicon':
          return OcticonIcon;
        case 'material':
          return MaterialIcon;
        case 'material-community':
          return MaterialCommunityIcon;
        case 'ionicon':
          return Ionicon;
        case 'foundation':
          return FoundationIcon;
        case 'evilicon':
          return EvilIcon;
        case 'entypo':
          return EntypoIcon;
        case 'font-awesome':
          return FAIcon;
        case 'simple-line-icon':
          return SimpleLineIcon;
        default:
          return MaterialIcon;
      }
    };