4p-common 中文文档教程
4p-common
Install
npm install --save 4p-common
Commands
./
yarn start
: rolls up thesrc
directory and watches for changes
./example
yarn start
: Starts the demo application
Components
Fields
Formik 字段:
- AddressInput
- CreateSelect
- CurrencyInput
- … @TODO add the rest and link to
Usage
import React, { Component } from 'react'
import MyComponent from '4p-common'
class Example extends Component {
render () {
return (
<MyComponent />
)
}
}
Developing
src/
将设置和创建我们的通用组件
example/
的地方此项目中的沙箱用于开发。 我们从 src/
目录中拉取组件并演示它们是如何使用的
Publishing
$ npm login <login with ocupop creds>
# [ ] Make sure to push changes to git first
# [ ] Make sure to bump the version number
$ npm publish
4p-common
Install
npm install --save 4p-common
Commands
./
yarn start
: rolls up thesrc
directory and watches for changes
./example
yarn start
: Starts the demo application
Components
Fields
Formik Fields:
- AddressInput
- CreateSelect
- CurrencyInput
- … @TODO add the rest and link to
Usage
import React, { Component } from 'react'
import MyComponent from '4p-common'
class Example extends Component {
render () {
return (
<MyComponent />
)
}
}
Developing
src/
Where our common components will be setup and created
example/
A sandbox within this project to develop against. We pull components in from the src/
directory and demonstrate how they're used
Publishing
$ npm login <login with ocupop creds>
# [ ] Make sure to push changes to git first
# [ ] Make sure to bump the version number
$ npm publish