arvi-components

1.0.4 • Public • Published

Components

This is a set of common components for a project

Installation

npm install arvi-components --save

Usage

import { Button } from 'arvi-components';

Developing

Storybook

To start developing you need to start storybook

npm run storybook

Coding

Create common component. Than add story that describes your component to see it in storybook.

function loadStories() {
    // You can require as many stories as you need.
}

CodeHighlight

const code =
`<Button
    btnStyle={Button.btnStyle.primary}
    onClick={action('You clicked button')}
>
    Button
</Button>`;

<CodeHighlight>{code}</CodeHighlight>

StoryBookTable

For automatically import information about component we use react-docgen and react-docgen-loader Loader will parse your file and create component schema: description, methods and props

const docs = require('!!react-docgen-loader!../../src/components/Button.jsx');

// StoryBookTable is created for PROPS only (for now)
<StoryBookTable data={docs.props} />

Tests

Write tests with jest and enzyme

Commit

semantic-release-gitlab helps to automatically create version of release. We use AngularJS Git Commit Message Conventions Please see https://gist.github.com/stephenparish/9941e89d80e2bc58a153

Commit workflow

// check current status
git status
// add to git all files
git add .
// commit all changes using commitizen
npm run commit
// this will run cli that will help to to write a comment that will help to recognize the version

Package Sidebar

Install

npm i arvi-components

Weekly Downloads

9

Version

1.0.4

License

ISC

Last publish

Collaborators

  • sbogdc