Convenient default icon placeholder component. Automatically generated background color and properly contrasted font. Compatible with react-native and expo.
npm install react-native-default-icon
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}
/>
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 |
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library