Skip to content
master
Switch branches/tags
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
bin
 
 
doc
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Kitten

Kitten is a components library based on Sass and React. It provides mixins to create flexible components based on your own brand elements (colors, fonts, typographic scale, etc.).

You can check out Kitten's components on Storybook.

Kittens

Dependencies

  • react >= 16.8.x
  • react-dom >= 16.8.x
  • @babel/polyfill if you support IE10 and previous versions

Table of content

Installation

$ npm install @kisskissbankbank/kitten

Usage

CSS utilities

CSS Utilities are classe that can be used for very basic styling. These utility classes are used by React Components. Kitten will not work properly without these utility classes.

@import '@kisskissbankbank/kitten/src/stylesheets/utilities';

Look at the doc to know if/when to use it.

React components

You can render React components directly in your js bundle:

import { SimpleCard } from '@kisskissbankbank/kitten'

ReactDOM.render(
  <SimpleCard {...props} />,
  document.getElementById('main')
)

Development

Components

Check out the guidelines to start creating new components!

Install

$ bin/install

Cleanup

To cleanup installed modules:

bin/cleanup

Storybook

To launch storybook locally:

npm run storybook

The page http://localhost:6006 will be opened automatically.

Component testing

To launch the JS tests:

$ npm test

Check out the guidelines to know how to test kitten.

Contributing

To contribute code:

  • Create a pull request on GitHub with a clear title in English.

  • Tag it with the right labels: Needs reviews, Needs testing or Work in progress.

  • Don't forget to update the CHANGELOG.md under the [unreleased] section with the following syntax:

    - Breaking change: a breaking change.
    - Feature: a new feature.
    - Fix: a fix.

To merge code into master:

  • Make sure the code has been reviewed by someone.
  • Make sure it has been tested.
  • Merge using Squash and merge on GitHub.
  • Delete the branch.

Release

Only for KissKissBankBank collaborators

Login

If this is your first release, start by saving your npm credentials in your ~/.npmrc by calling:

$ npm login

Prepare the release pull request

  • Pull master.
  • Update the CHANGELOG.md file:
  • Update the package.json file:
    • Update the version with the version of the library.
  • Update the package-lock.json file:
    • Update the version with the version of the library.
  • Run this command:
bin/release NEW_VERSION
  • Follow the link to create the pull request on Github.
  • Announce the release on KissKissBankBank's #kit-ui Slack channel with the related CHANGELOG.

Release!

Once the pull request is accepted:

  • Merge the pull request into master.
  • Delete the release branch.
  • Run this command:
bin/publish with-storybook