Last active
February 20, 2020 15:14
-
-
Save imgly-gists/64daef5ec746c10a335dc02da810549d to your computer and use it in GitHub Desktop.
Minimal React Native app which shows how to add custom stickers to PhotoEditor SDK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import { Configuration, PhotoEditorModal } from 'react-native-photoeditorsdk'; | |
const configuration: Configuration = { | |
sticker: { | |
categories: [{ | |
identifier: "demo_sticker_category", name: "Logos", | |
thumbnailURI: require("./react.png"), | |
items: [{ | |
identifier: "demo_sticker_react", name: "React", | |
stickerURI: require("./react.png") | |
}, { | |
identifier: "demo_sticker_imgly", name: "img.ly", | |
stickerURI: require("./imgly.png") | |
} | |
]} | |
]} | |
} | |
export default class App extends Component { | |
render() { | |
return ( | |
<PhotoEditorModal visible={true} | |
image={require("./image.jpg")} | |
configuration={configuration}/> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment