Skip to content
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

Unable to import default presets #70

Open
boyestrous opened this issue Apr 20, 2022 · 1 comment
Open

Unable to import default presets #70

boyestrous opened this issue Apr 20, 2022 · 1 comment

Comments

@boyestrous
Copy link

My apologies if I'm overlooking something simple here, but I cannot import the values for the Presets.

import { Presets } from 'react-native-gl-image-filters';

When I try to use these values, it tells me that Presets is a type interface, which doesn't seem right to me. I was expecting to be able to use the presets like in the Readme (below)

<ImageFilters {...**Presets.StinsonPreset**}> {{ uri: 'https://i.imgur.com/5EOyTDQ.jpg' }} </ImageFilters>

I'm relatively new to React Native, so please let me know if I'm doing this wrong.

Thank you!

@GregoryNative
Copy link
Owner

Are you sure that you spread preset like this:
<ImageFilters {...Presets.StinsonPreset}>

and not with asterisks?
<ImageFilters {...**Presets.StinsonPreset**}>

I can confirm, that it working fine, at least on react web.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants