zamplyy / react-native-nice-avatar

React Nice Avatar but for React Native 📱
MIT License
6 stars 3 forks source link

Export Enums for Props #9

Closed NilsBaumgartner1994 closed 2 years ago

NilsBaumgartner1994 commented 2 years ago

Would be nice to use the Props with enums

export enum HatStyle {
    beanie = 'beanie',
    turban = 'turban',
    none = 'none'
}

export interface AvatarConfig {
  hatStyle?: HatStyle;
...
}
zamplyy commented 2 years ago

Found another way of doing it, but you should be able to import HatStyle from version 1.1.1

zamplyy commented 2 years ago

For example using it like this

import Avatar, { HatStyle } from "@zamplyy/react-native-nice-avatar"
...
<Avatar size={50} hatStyle={HatStyle.beanie} />