1.7.0 • Published 5 years ago

@winnie.ho.ama/ama-react-components v1.7.0

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
5 years ago

Build Status semantic-release

AMA React Components Library

This is a library of shared React components and its living storybook.

Available Components

Using this library

To include any component from this library in your React app, run this in terminal:

yarn add @winnie.ho.ama/ama-react-components

In App.js, wrap your app with ThemeProvider like this:

import { ThemeProvider } from 'styled-components'
import { Theme } from '@winnie.ho.ama/ama-react-components/dist/styles'

function App() {
  return (
    <ThemeProvider theme={Theme}>
      <div className="App">
      ...
      </div>
    </ThemeProvider>
  )
}

To use a component, do this:

import { Button } from '@winnie.ho.ama/ama-react-components'

render() {
  return (
    <Button/>
  )
}

Contribute to this library

Development of this library happens in the winnie.ho.ama organization for now. We will move the package under AMA umbrella when an official AMA account is set up at npmjs.com.

Talk to Dave or Winnie in blue team to be invited to winnie.ho.ama.

Run npm login and enter your npmjs.com credentials when prompted.

To avoid duplicate effort, please discuss with the Blue team before adding any new component. We might be able to update existing components to suit your needs.

Commit message format

We follow the Angular Commit Message Conventions by using commitizen.

Commit changes using commitizen

This repo is commitizen friendly!

Instead of using git commit, use yarn commit and follow the prompts.

Publish updates to npm package

We use semantic-release to automate package release workflow.

Whenever a PR is created, updated or re-opened, semantic-release is dry-run and you can see its commit analysis and preview the package version in the CodeBuild log.

When changes are pushed to the master branch, semantic-release is run again and it will publish a new version of this package to npm (same version as previewed in dry runs).

Available Scripts

yarn lint

Runs linter and displays any error

yarn lint-fix

Runs linter, displays errors and fix them automatically

yarn test

Launches the test runner in the interactive watch mode. There's no test for now but they will be aded.

yarn storybook

Run Storybook locally at port 80 and view latest changes to the library visually. Work is being done to host the living Storybook on AWS Amplify.

yarn build-storybook <path to any existing folder>

Export current Storybook as a self-contained static web app in your folder of choice.

E.g. yarn build-storybook ../ama-storybook/0.1.0 will export current Storybook to the folder ama-storybook/0.1.0 outside of this project folder.

1.7.0

5 years ago

1.6.0

5 years ago

1.5.2

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago