0.1.3 • Published 1 year ago

react-native-default-icon v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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

PropTypeRequiredDescription
valuestringtrueWill generate same background color for same inputted value
fontSizeViewStylefalseConvenience prop to modify text's fontSize
widthViewStylefalseConvenience prop to modify contentContainer's width
heightViewStylefalseConvenience prop to modify contentContainer's height
borderRadiusViewStylefalseConvenience prop to modify contentContainer's borderRadius
contentContainerStyleViewStylefalseReact-Native View StyleProp
textStyleTextStylefalseReact-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