contentco-components v1.5.21
contentco-components
Shared components for Content.co platform
Installation in your packages
npm install --save git+https://github.com/boltmedia/contentco-components.gitor
yarn add git+https://github.com/boltmedia/contentco-components.gitIf 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-componentsIf 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
- To get started you need to install both
rollupandstorybook
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- To add a new component, you can create it manually or use the built-in helper to generate the base files.
yarn generate [ComponentName]- To test your components, I recommend using Storybook, which will rebuild on each change you make:
yarn storybook- To generate a build for release, you can run:
yarn buildNotes
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.
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago