Skip to content

debtcollective/header

Build Status codecov Renovate enabled

Installation

yarn add @debtcollective/header

Usage

import React, { Component } from 'react'
import Header from @debtcollective/header

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

Dependencies

Check package.json peerDependencies.

Development

In the project directory, the principal commands you may want to know are:

yarn start

Runs Rollup in watch mode

yarn build

Builds the package using Rollup

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

yarn docz dev

Launches a server with components documentation.

Example app

To run the example run:

cd example
yarn install
yarn start

This app is based on create-react-app, serving 2 purposes

  • Local, hot-reload server for developing your module
  • Easily publishable to github pages

Coding guideline

  • We use semantic commits throught https://commitizen.github.io/cz-cli/
  • While Material UI support withStyles we prefer the usage of https://www.styled-components.com to do so, often needing to apply extra specificity to allow styles to being applied
  • Some UI pieces from Material UI needs unique identifiers, so we use constants in the same file but with a format to avoid conflicts like so: const <ELEMENT_TYPE>_NAME = "@@<scope>/<component>/<element_type>";

License

BSD-3-Clause © @debtcollective