react-useravatar-native
Install
Run npm i react-useravatar-native --save
Usage
Basic
... { return <UserAvatar username="bltnico" size=70 onLongPress=thisgetUserInfos /> ;}
Custom design
... { ... thisstate = opacity : 0 ;} { let _opacity = thisstateopacity; return <UserAvatar style= stylescustomAvatar opacity : _opacity textStyle=stylescustomAvatarText username="bltnico" onPressIn= { this; } onPressOut= { this; } /> ;} let styles = StyleSheet;
Props
-
username string (required)
-
size integer
-
style object
-
onPress function
-
onLongPress function
-
onPressIn function
-
onPressOut function
-
textLength integer
-
textStyle object
-
textColor string
-
borderStyle boolean
Dev and test
Install babel by npm install
And compile with babel src --out-dir lib
Babel .babelrc
use es2015 and react compiler