miukimiu / react-kawaii

Cute SVG React Components
https://react-kawaii.vercel.app/
MIT License
2.91k stars 104 forks source link

Import not working when using react-native, workaround included. #74

Closed hairychris closed 5 years ago

hairychris commented 5 years ago

Hello :)

When using the library with Expo like so:

expo init kawaiitest
cd kawaiitest
yarn add https://github.com/miukimiu/react-kawaii.git#new-site-and-react-native

Adding this to the main page:

import { Planet } from 'react-kawaii/native';
const Example = () => <Planet size={200} mood="blissful" color="#FDA7DC" />;

There is an import error on this line: https://github.com/miukimiu/react-kawaii/blob/9ca38dcb6be23bfdd9ed2a0612b3eeb23ff16f74/native/components/common/face/Face.js#L4

If you modify that line to read:

import paths from 'react-kawaii/src/components/common/face/paths';

Everything works fine, am I importing things wrong or is this a bug?

miukimiu commented 5 years ago

Hi @hairychris,

I never merged the branch new-site-and-react-native because I didn't have time to finish the new website and the react-native implementation.

But I published a new version (0.13.0) with support for react-native. I tested with Expo and it seems to be working. 👍