react-native-default-icon
v0.1.3
Published
Convenient default icon placeholder component. Automatically generated background color and properly contrasted font. Compatible with react-native and expo.
Downloads
14
Maintainers
Readme
react-native-default-icon
Convenient default icon placeholder component. Automatically generated background color and properly contrasted font. Compatible with react-native and expo.
Installation
npm install react-native-default-icon
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