/axiom-react

Axiom - Brandwatch design system and React pattern library

Primary LanguageJavaScript

⚠️ NOTICE: For the time being, you are probably looking for axiom-react: https://github.com/Binarytales/axiom-react

If you have forked this repository we recommend updating your remotes or even removing your fork and reforking the axiom-react repository.

Bug fixes will need to be replicated across both repositories until we have publishing from this now private repository set up correctly. If you have any problems as a result of this change please seek help in #axiom-contrib on Slack

axiom

Brandwatch design system and React pattern library

Travis Status NPM Downloads

Getting started

The best way to consume Axiom-React is with the npm package.

First install which part of Axiom you need - Refer to the Packages table for more information about what is within each package.

Adding the button component

npm i @brandwatch/axiom-components --save
import { Button } from '@brandwatch/axiom-components';

You can now use the button component - To see how this can be styled and configured see Button

<Button style="primary">
  Primary
</Button>

Set a theme

Axiom needs to run in one of two themes, day or night.

The class of ax-theme--day or ax-theme--night should be applied to either <html>, <body>, or an app encompassing <div>

Packages

This is the monorepo for Axiom packages.

package description     version    
axiom-automation-testing Provides IDs and selectors for targeting Axiom internal elements for Automation testing npm
axiom-charts Provides Axiom charting and data visualisation React components npm
axiom-components Provides core Axiom components for building Brandwatch UIs npm
axiom-composites Provides Brandwatch contexutal components, comprising of Axiom components and materials. npm
axiom-documentation-loader Webpack loader for extracting React component prop types and descriptions. npm
axiom-documentation-viewer Provides React components for displaying, testing and viewing React components in configurable states. npm
axiom-formatting Axiom resources for formatting dates and numbers npm
axiom-localization Resources for helping out with localizations npm
axiom-materials Low level resources, like colours and sizing variables to help build components npm
axiom-utils Helpful javascript utilities npm
babel-plugin-axiom-imports An Axiom specific babel plugin that transforms and removes unused Axiom exports. npm
babel-plugin-transform-svg-axiom A babel plugin that recolours, optimises and inlines SVG files npm
eslint-config-axiom eslint configurations used by Axiom and some other Brandwatch applications npm
stylelint-config-axiom stylelint configurations used by Axiom and some other Brandwatch applications npm

Developing

Axiom uses lerna and yarn workspaces to manage the various packages. To get up and running developing locally, you need the lerna cli. We're using the latest stable Node.js release.

git clone git@github.com:BrandwatchLtd/axiom-react.git
cd axiom
yarn
yarn start

Contributing

Please checkout the CONTRIBUTING.md but basically we use the conventional commit format (google it) to handle automatic publishing, check tests and add them where appropriate and check linting.

Styleguide driven development is crucial. Most changes should be visble and replicable through the style guide and, where appropriate, through design review.