Skip to content
Snippets Groups Projects
app-icon.js 567 B
Newer Older
import React from 'react'
import PropTypes from 'prop-types'
import { StyleSheet } from 'react-native'
import Icon from 'react-native-vector-icons/Entypo'

mashazyu's avatar
mashazyu committed
import { Sizes } from '../../styles/redesign'
mashazyu's avatar
mashazyu committed
const AppIcon = ({ color, name }) => {
  const style = [styles.icon, { color }]

  return <Icon name={name} style={style}/>
}

AppIcon.propTypes = {
mashazyu's avatar
mashazyu committed
  color: PropTypes.string,
  name: PropTypes.string.isRequired
}

AppIcon.defaultProps = {
mashazyu's avatar
mashazyu committed
  color: 'black'
}

const styles = StyleSheet.create({
  icon: {
    fontSize: Sizes.subtitle
  }
})

export default AppIcon