react-native-default-icon
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

react-native-default-icon

Convenient default icon placeholder component. Automatically generated background color and properly contrasted font. Compatible with react-native and expo.

CI npm version License: MIT React-Native Expo

Installation

npm install react-native-default-icon

example app

Usage

import DefaultIcon from 'react-native-default-icon';

// ...

<DefaultIcon value={'Icon'} />      

<DefaultIcon
    value={'expo'}
    contentContainerStyle={styles.contentContainerStyle}
    textStyle={styles.textStyle}
/>

<DefaultIcon
    value={'React-Native'}
    borderRadius={50}
    fontSize={25}    
    height={100}
    width={50}
/>

Props

Prop Type Required Description
value string true Will generate same background color for same inputted value
fontSize ViewStyle false Convenience prop to modify text's fontSize
width ViewStyle false Convenience prop to modify contentContainer's width
height ViewStyle false Convenience prop to modify contentContainer's height
borderRadius ViewStyle false Convenience prop to modify contentContainer's borderRadius
contentContainerStyle ViewStyle false React-Native View StyleProp
textStyle TextStyle false React-Native Text StyleProp

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Package Sidebar

Install

npm i react-native-default-icon

Weekly Downloads

1

Version

0.1.3

License

MIT

Unpacked Size

18.7 kB

Total Files

10

Last publish

Collaborators

  • charlynedsson