@peppas/ui
v0.0.1
Published
UI HUB
Downloads
28
Keywords
Readme
@peppas/ui
Getting started
$ npm install @peppas/ui --save
Mostly automatic installation
$ react-native link @peppas/ui
Manual installation
iOS
Android
- Open up
android/app/src/main/java/[...]/MainApplication.java
- Add
import com.peppas.ui.UIReactPackage;
to the imports at the top of the file - Add
new UIReactPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':@peppas/ui' project(':@peppas/ui').projectDir = new File(rootProject.projectDir, '../node_modules/@peppas/ui/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':@peppas/ui')
API
- ImagePlus
- ....
Usage
1. ImagePlus
propTypes: {
source: PropTypes.any,
resizeMode: PropTypes.oneOf(['cover', 'contain', 'stretch', 'center']),
...Image.propTypes, // 包含默认的View的属性
},
import {ImagePlus} from '@peppas/ui';
...
<ImagePlus source={{uri:'https://imgqcg01.qfq.me/cd/50/cd50f91376d4d10ad60e2fd900c88b56.png'}} style={{width:200,height:200}}/>