@peppas/ui

0.0.1 • Public • Published

@peppas/ui

Getting started

$ npm install @peppas/ui --save

Mostly automatic installation

$ react-native link @peppas/ui

Manual installation

iOS

Android

  1. 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 the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':@peppas/ui'
    project(':@peppas/ui').projectDir = new File(rootProject.projectDir, 	'../node_modules/@peppas/ui/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':@peppas/ui')
    

API

  1. ImagePlus
  2. ....

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}}/>

Readme

Keywords

Package Sidebar

Install

npm i @peppas/ui

Weekly Downloads

10

Version

0.0.1

License

MIT

Unpacked Size

21.1 kB

Total Files

17

Last publish

Collaborators

  • shangyuchen
  • xfjtmsm
  • phoobobo
  • liujunrong
  • mobile_master