Code Monkey home page Code Monkey logo

ui's Introduction

Klarna UI Components

Build Status npm version

This library contains the basic set of components used by multiple front end projects across Klarna. It exposes React API compatible components as well as CSS modules.

Install

npm install @klarna/ui --save

You can use the UI components either with React and Preact. Learn more in the docs.

This project has several peer dependencies that it needs to work. Although they are no technically peer dependencies, we need to treat them that way to ensure that Webpack does not bundle them twice in the final builds of the consumer projects.

Install all peer dependencies with:

npm install react react-motion html2react ramda --save

This package has a build, but usage of it is not recommended. You must have a Babel pipeline to use it. Read more about how to config it.

Wiki

There are plenty of articles in our wiki. Check it out

Run locally

To run the project, NPM 3+ is required.

To run the showroom locally:

npm install
npm start

Open localhost:7777/ui/.

License

Please check the LICENSE file.

Contributing

Make sure:

  1. Your contribution is aligned with the styleguide.
  2. Your contribution doesn't break the grid. To avoid that, always use the $grid variable to define your sizes, as in line-height: ($grid * 4). As a rule of thumb, if your element total height (sum of content, paddings, margins, etc.) has an integer multiple of $grid you should be good.
  3. Your code is linted: npm run lint.
  4. It works in the major browsers, the simplest way is to spawn ngrok and use the cloud service of your choice. Else, you can download IE virtual machines for VirtualBox using curl -s https://raw.githubusercontent.com/xdissent/ievms/master/ievms.sh | env IEVMS_VERSIONS="9" bash.

Then:

  1. Send a PR.
  2. Once approved (with 👍 reaction or a LGTM comment):
  3. Merge to master
  4. Pull master locally
  5. Update the version using npm version <major|minor|patch> -m "Some message describing what happened" (tag will have v prefix). The message will be published as the release notes in Github.
  6. Push master and the new tag as well. (git push origin master --follow-tags)
  7. Go to https://github.com/klarna/ui/releases, click on "Draft a new release" and add notes for your release version. Make sure to enter the number of your release including the v in the "Tag version" field, ie. v4.13.2

Travis will take care of publishing your new version to npm. In a matter of minutes it should be ready. You can check the status of the release publication by reading the log of the build corresponding to your tag. The list of Travis builds can be found in https://travis-ci.org/klarna/ui/builds

ui's People

Contributors

xaviervia avatar nevon avatar pirelenito avatar jonotrujillo avatar yuval-netanel avatar farfalena-zz avatar dongideon avatar omriyariv avatar joakimlofgren avatar martinnorum avatar npejo avatar cskeppstedt avatar vectart avatar mellbourn avatar farfalena avatar deschtex avatar schold avatar moriaklarna avatar alexanderlindholm avatar ohadco avatar andreasarledal avatar

Watchers

James Cloos avatar Michał Beczek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.