diff --git a/.gitignore b/.gitignore
index df4c011..9a03b5b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,4 +5,6 @@ node_modules
.idea
out
yarn-error.log
-transform
\ No newline at end of file
+transform
+
+.vscode
diff --git a/pages/svg-to-react-native.js b/pages/svg-to-react-native.js
new file mode 100644
index 0000000..c194e30
--- /dev/null
+++ b/pages/svg-to-react-native.js
@@ -0,0 +1,40 @@
+import React, { PureComponent } from 'react'
+import convertSvgString from 'transform-svg-to-native'
+import Layout from '../components/Layout'
+import ConversionPanel from '../components/ConversionPanel'
+import isSvg from 'is-svg'
+import svgo from 'transform-svg-to-native/dist/svgo'
+
+const defaultText = ``
+
+export default class Svg2ReactNative extends PureComponent {
+ getTransformedValue = async (newValue: string) => {
+ if (!isSvg(newValue)) {
+ throw new Error('Please provide a valid SVG markup.')
+ }
+
+ return new Promise(resolve =>
+ convertSvgString(newValue, code => resolve(code))
+ )
+ }
+
+ render () {
+ return (
+
+
+
+ )
+ }
+}
diff --git a/utils/routes.js b/utils/routes.js
index e91f8f7..7474313 100644
--- a/utils/routes.js
+++ b/utils/routes.js
@@ -51,6 +51,12 @@ export const categorizedRoutes = [
desc:
'An online REPL for converting HTML to JSX with proper support for SVG.'
},
+ {
+ label: 'SVG to React Native',
+ path: '/svg-to-react-native',
+ desc:
+ 'An online REPL for converting SVG to React Native compatible equivalent.'
+ },
{
label: 'CSS to JS Objects',
path: '/css-to-js',