mirror of
https://github.com/iconoir-icons/iconoir
synced 2024-06-08 17:02:35 +02:00
Add react-native example
This commit is contained in:
parent
99f6dac1a6
commit
60acd6d8b7
35
examples/react-native/.gitignore
vendored
Normal file
35
examples/react-native/.gitignore
vendored
Normal 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
26
examples/react-native/App.js
vendored
Normal 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>
|
||||||
|
);
|
||||||
|
}
|
30
examples/react-native/app.json
Normal file
30
examples/react-native/app.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
BIN
examples/react-native/assets/favicon.png
Normal file
BIN
examples/react-native/assets/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
7
examples/react-native/babel.config.js
Normal file
7
examples/react-native/babel.config.js
Normal 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
17437
examples/react-native/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
25
examples/react-native/package.json
Normal file
25
examples/react-native/package.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,4 +1,5 @@
|
||||||
packages:
|
packages:
|
||||||
- packages/*
|
- packages/*
|
||||||
- examples/*
|
- examples/*
|
||||||
|
- '!examples/react-native'
|
||||||
- iconoir.com
|
- iconoir.com
|
||||||
|
|
Loading…
Reference in a new issue