AvatarHelpers
Methods
| Methods | Description | Arguments |
|---|---|---|
| getAvatarColors | Return array of colors for use with the Avatar component. | none |
| getColorById | ||
| getInitials | Return initials from given name. | name - string to use for extracting avatar initials. |
Usage
getInitials
import {AvatarHelper} from 'react-native-ui-lib';
AvatarHelper.getInitials('Lilly Wheeler'); // LW
AvatarHelper.getInitials('Russell Lloyd'); // RL
AvatarHelper.getInitials('Andrew'); // A