-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export individual components #4
Comments
You need to wrap the component inside a // imports
import { mouthsMap } from 'react-native-bigheads';
import { Svg } from 'react-native-svg';
// render
<View style={{ width: 500, height: 500 }}>
<Svg viewBox="0 0 1000 990">
<mouthsMap.lips lipColor="green" />
</Svg>
</View> Remember that some components receive their own properties, unfortunately that is not documented. |
I like the idea of exporting individual components in a better and friendly way, so I'm going to keep this issue open. |
Hi, i'm also trying to get all components one by one to create an avatar customizer... I'm in trouble because this is working
But for some other components like hairMap or bodyMap, it is not working Many thanks for this nice project ! |
Here as well, I might be late to the party, but did anyone find a solution to have those separated components? @loangodard @felipecespedes ? |
Hi! I really like the library, looks very friendly!
I'd like to implement a "Create your Avatar" screen, similar to the one Snapchat (BitMoji) has. The user can scroll through available parts, and pick the ones that he wants. Unfortunately, the individual components (hairstyles, shirts, etc) are only exported in maps, and I'm not sure how I could render them in a FlatList/ScrollView.
I've tried the following:
But that just renders nothing. I assume I have to wrap the
<Comp/>
inside some parent View, such as a<View>
or<Svg>
, since the Mouth renderer actually returns a Fragment of Svg components. Could you point me in the right direction on how I could render those correctly?Thanks!
The text was updated successfully, but these errors were encountered: