-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix:新增@uiw/react-native-image-picker
- Loading branch information
1 parent
0d280c9
commit 5a06141
Showing
20 changed files
with
263 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/// <reference types="react" /> | ||
declare const ImagePicker: () => JSX.Element; | ||
export default ImagePicker; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react'; | ||
import {View, Text, StyleSheet} from 'react-native'; | ||
const ImagePicker = () => { | ||
return ( | ||
<View style={styles.tree}> | ||
<Text>ImagePicker</Text> | ||
</View> | ||
); | ||
}; | ||
const styles = StyleSheet.create({ | ||
tree: { | ||
paddingHorizontal: 10, | ||
paddingVertical: 5, | ||
backgroundColor: '#fff', | ||
}, | ||
}); | ||
export default ImagePicker; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export {default as ImagePicker} from './ImagePicker'; | ||
export * from './ImagePicker'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export {default as ImagePicker} from './ImagePicker'; | ||
export * from './ImagePicker'; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["@babel/preset-typescript"] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
<p align="center"> | ||
<a href="https://uiwjs.github.io"> | ||
<img width="150" src="https://raw.githubusercontent.com/uiwjs/uiw/92f189f53312f1177466f48991736f95f86da0a6/src/assets/logo-README.svg?sanitize=true"> | ||
</a> | ||
</p> | ||
<p align="center"> | ||
<a href="https://github.com/uiwjs/react-native-uiw/issues"> | ||
<img src="https://img.shields.io/github/issues/uiwjs/react-native-uiw.svg"> | ||
</a> | ||
<a href="https://github.com/uiwjs/react-native-uiw/network"> | ||
<img src="https://img.shields.io/github/forks/uiwjs/react-native-uiw.svg"> | ||
</a> | ||
<a href="https://github.com/uiwjs/react-native-uiw/stargazers"> | ||
<img src="https://img.shields.io/github/stars/uiwjs/react-native-uiw.svg"> | ||
</a> | ||
<br> | ||
<a href="https://github.com/uiwjs/react-native-uiw/releases"> | ||
<img src="https://img.shields.io/github/release/uiwjs/react-native-uiw.svg"> | ||
</a> | ||
<a href="https://github.com/uiwjs/react-native-uiw"> | ||
<img src="https://img.shields.io/dub/l/vibe-d.svg"> | ||
</a> | ||
<a href="https://www.npmjs.com/package/@uiw/react-native"> | ||
<img src="https://img.shields.io/npm/v/@uiw/react-native.svg"> | ||
</a> | ||
</p> | ||
|
||
React Native UIW | ||
--- | ||
|
||
A UI component library based on React Native (Android & iOS). | ||
|
||
[快速上手](https://uimjs.github.io/#/docs/getting-started) | [参与组件开发](https://uimjs.github.io/#/docs/development/components) | [参与文档/网站编辑开发](https://uimjs.github.io/#/docs/development/document) | [组件库](https://uimjs.github.io/#/components/about) | ||
|
||
您可以使用我们制定的模版([`@uiw/react-native-template`](https://github.com/uiwjs/react-native-template))创建一个新项目: | ||
|
||
<!--rehype:style=background-color: rgb(118 247 149);--> | ||
```shell | ||
# 此模板默认集成了一些必用的依赖,如路由,组件库等 | ||
npx react-native init AwesomeProject --template @uiw/react-native-template | ||
``` | ||
|
||
## Install | ||
```bash | ||
yarn add @uiw/react-native react-native-svg@12.1.1 react-native-root-siblings@4.1.1 react-native-gesture-handler@2.8.0 | ||
``` | ||
|
||
## Basic Usage | ||
|
||
```jsx | ||
import React from 'react'; | ||
import { View } from 'react-native'; | ||
import { Icon } from '@uiw/react-native' | ||
|
||
export default class Demo extends React.Component { | ||
render() { | ||
return ( | ||
<View> | ||
<Icon name='apple' size={46} color='#50CB42' /> | ||
</View> | ||
) | ||
} | ||
} | ||
``` | ||
|
||
## Other | ||
|
||
- [@uiw/react-native-alipay](https://github.com/uiwjs/react-native-alipay) | ||
- [@uiw/react-native-amap-geolocation](https://github.com/uiwjs/react-native-amap-geolocation) | ||
|
||
## Development | ||
|
||
```bash | ||
# Install current dependencies, and dependencies in sub-packages | ||
yarn install | ||
yarn run build # Compile package | ||
``` | ||
|
||
Real-time monitoring of package and document website local preview | ||
|
||
```bash | ||
# Step 1 | ||
yarn run lib:watch # Compile and output JS file | ||
# Step 2 | ||
yarn run lib:watch:type # Output type file d.ts | ||
# Step 3 | ||
yarn run start # Run the preview document website locally | ||
``` | ||
|
||
## 文档本地预览 | ||
|
||
**第一步安装文档包和预览工具** | ||
|
||
```bash | ||
npm install @uiw/react-native-doc @kkt/doc -D # yarn add @uiw/react-native-doc @kkt/doc -D | ||
``` | ||
|
||
**第二步配置命令** | ||
|
||
在`package.json`文件中配置命令 | ||
|
||
```json | ||
// ... | ||
"scripts":{ | ||
"doc":"kktd @uiw/react-native-doc/doc/build" | ||
} | ||
``` | ||
|
||
|
||
### License | ||
|
||
Licensed under the MIT License. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"name": "@uiw/react-native-image-picker", | ||
"version": "3.2.3", | ||
"description": "UIW for React Native", | ||
"homepage": "https://uiwjs.github.io/react-native-uiw/", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"scripts": {}, | ||
"keywords": [ | ||
"uiw", | ||
"react-native", | ||
"ImagePicker" | ||
], | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/uiwjs/react-native-uiw" | ||
}, | ||
"files": [ | ||
"lib", | ||
"src", | ||
"README.md" | ||
], | ||
"dependencies": { | ||
"@babel/runtime": "~7.20.7", | ||
"@types/lodash": "~4.14.191", | ||
"@types/react-native": "0.69.1", | ||
"@uiw/icons": "2.5.3", | ||
"ahooks": "2.10.14", | ||
"lodash": "4.17.21", | ||
"prop-types": "15.7.2", | ||
"react-native-svg": "12.1.1", | ||
"@shopify/restyle":"~2.4.2", | ||
"@uiw/react-native":"~3.2.3" | ||
}, | ||
"peerDependencies": { | ||
"react": ">=16.9.0", | ||
"react-native": ">=0.60.0", | ||
"react-native-svg": ">=9.9.3" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "~7.20.7", | ||
"@babel/preset-typescript": "~7.18.6" | ||
}, | ||
"engines": { | ||
"node": ">=16.0.0" | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
packages/react-native-image-picker/src/ImagePicker/index.tsx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import React, { useState } from 'react'; | ||
import { View, Text, StyleSheet } from 'react-native'; | ||
|
||
const ImagePicker = () => { | ||
return ( | ||
<View style={styles.tree}> | ||
<Text>ImagePicker</Text> | ||
</View> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
tree: { | ||
paddingHorizontal: 10, | ||
paddingVertical: 5, | ||
backgroundColor: '#fff', | ||
}, | ||
}); | ||
|
||
export default ImagePicker; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { default as ImagePicker } from './ImagePicker'; | ||
export * from './ImagePicker'; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowJs": false, | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"outDir": "lib", | ||
"declaration": true, | ||
"jsx": "react-native", | ||
"lib": ["es6"], | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"moduleResolution": "node", | ||
"allowSyntheticDefaultImports": true, | ||
"strict": true, | ||
"noEmit": false, | ||
"target": "esnext", | ||
"module": "esnext", | ||
"baseUrl": "." | ||
}, | ||
"exclude": ["node_modules"], | ||
"include": ["src"] | ||
} |
Oops, something went wrong.