contentco-components

1.5.21 • Public • Published

contentco-components

Shared components for Content.co platform

NPM JavaScript Style Guide

Installation in your packages

npm install --save git+https://github.com/boltmedia/contentco-components.git

or

yarn add git+https://github.com/boltmedia/contentco-components.git

If you are going to do active development on the components while testing it in the actual repo, you can also add the package locally:

yarn add file:../contentco-components

If you add it locally, ensure that you replace it with the Github package before commit it back to the repo.

Usage

import React, { Component } from 'react';

import { MyComponent } from 'contentco-components';

class Example extends Component {
  render() {
    return <MyComponent />;
  }
}

Development

  1. To get started you need to install both rollup and storybook
npx sb@6.0.28
yarn -D add rollup

# Installing as peer dependencies
yarn add -P classnames@2.2.6 prop-types@15.7.2 react@16.13.1 react-dom@16.13.1

  1. To add a new component, you can create it manually or use the built-in helper to generate the base files.
yarn generate [ComponentName]
  1. To test your components, I recommend using Storybook, which will rebuild on each change you make:
yarn storybook
  1. To generate a build for release, you can run:
yarn build

Notes

Fonts are included in the package but are not used in the components, only used for the Storybook previews. You should include the fonts in the actual project.

Readme

Keywords

none

Package Sidebar

Install

npm i contentco-components

Weekly Downloads

1

Version

1.5.21

License

MIT

Unpacked Size

616 kB

Total Files

40

Last publish

Collaborators

  • contentco