4p-common

Common utilities & components shared across the 4p project

Usage no npm install needed!

<script type="module">
  import pCommon from 'https://cdn.skypack.dev/4p-common';
</script>

README

4p-common

Install

npm install --save 4p-common

Commands

  • ./

    • yarn start: rolls up the src 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