1.0.5 • Published 7 years ago

react-native-cross-platform-icons v1.0.5

Weekly downloads
198
License
MIT
Repository
github
Last release
7 years ago

react-native-cross-platform-icons

A react-native wrapper component that displays the appropriate icon based on the current platform ( Android and iOS )

demo

Installation

  • npm install --save react-native-cross-platform-icons react-native-vector-icons

After Installation (this step is required)

  • react-native link react-native-vector-icons

Usage

import React, { Component } from 'react';
import { View } from 'react-native';
import CrossPlatformIcon from 'react-native-cross-platform-icons';

class MyExample extends Component {
    render() {
        return (
            <View style={{ flex: 1 }}>
                <CrossPlatformIcon name="home" size={45} color="black" outline />
                <CrossPlatformIcon name="arrow-back" size={40} color="#BADA55" />
            </View>
        );
    }
}

export default MyExample;

More Icons

Check Out Here and use it's name into name props.

Props

PropertyTypeisRequired?Description
sizenumberRequiredicon size
colorstringRequiredicon color
namestringRequiredicon name
outlinebooleanOptionaloutline icon style (iOS only)

Credits

react-native-vector-icons Nick Wientge

License

MIT