Add react-native example

This commit is contained in:
Pascal Jufer 2023-10-29 01:41:05 +02:00
parent 99f6dac1a6
commit 60acd6d8b7
No known key found for this signature in database
8 changed files with 17561 additions and 0 deletions

35
examples/react-native/.gitignore vendored Normal file
View file

@ -0,0 +1,35 @@
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
# dependencies
node_modules/
# Expo
.expo/
dist/
web-build/
# Native
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
# Metro
.metro-health-check*
# debug
npm-debug.*
yarn-debug.*
yarn-error.*
# macOS
.DS_Store
*.pem
# local env files
.env*.local
# typescript
*.tsbuildinfo

26
examples/react-native/App.js vendored Normal file
View file

@ -0,0 +1,26 @@
import {
Check,
Iconoir,
IconoirProvider,
Medal1st,
} from 'iconoir-react-native';
import { View } from 'react-native';
export default function App() {
return (
<View>
<Iconoir />
<IconoirProvider
iconProps={{
color: '#1E441E',
strokeWidth: 1,
width: '2em',
height: '2em',
}}
>
<Check />
</IconoirProvider>
</View>
);
}

View file

@ -0,0 +1,30 @@
{
"expo": {
"name": "react-native-expo",
"slug": "react-native-expo",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,7 @@
module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};

17437
examples/react-native/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,25 @@
{
"name": "example-react-native",
"private": true,
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"android": "expo start --android",
"ios": "expo start --ios",
"start": "expo start",
"web": "expo start --web"
},
"dependencies": {
"@expo/webpack-config": "^19.0.0",
"expo": "~49.0.15",
"expo-status-bar": "~1.6.0",
"iconoir-react-native": "^6.11.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.72.6",
"react-native-svg": "^12.5.1",
"react-native-web": "~0.19.6"
},
"devDependencies": {
"@babel/core": "^7.20.0"
}
}

View file

@ -1,4 +1,5 @@
packages:
- packages/*
- examples/*
- '!examples/react-native'
- iconoir.com