npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@blockchain-com/components

v6.1.1

Published

Blockchain.com components library

Downloads

522

Readme

Coverage Status Flow Coverage CircleCI

js-standard-style Code Style: prettier Conventional Commits

Description

The library Components is based on React and styled-components. It contains basic components, "atoms", and more complex "molecules" that are used on the Blockchain.com ecosystem.

Installation

Just a quick npm i @blockchain-com/components and you are good to go!

Tips

Icons usage

1. FontAwesome icons (free version)

Use <Fas... />

  • Fas is the type ("Fab", "Far" and "Fas" are avaible)

    • Fab matches the brand iconset
    • Fas matches the solid iconset
    • Far matches the regular iconset
  • ... is the FontAwesome icon name formatted as PascalCase.

The full icon list is available here

Examples:

<FasCheckCircle />
<FarCheckCircle />
<FabFacebook />

cryptos

2. Crypto icons

Use <Crypto.../>

The list of crypto icons is available here

Examples:

<CryptoBtc />
<CryptoXlm />

cryptos

3. Custom (bc) icons

Use <Bc... />

The list of custom icons is available here

Examples:

<BcBlocks />
<BcTransactions />

cryptos

Development

Tooling

Both yarn and npm are supported.

The commands are given using npm however you can use the yarn equivalent and it will Just Work™

Link

If you want to change the library and reflect your changes on your consumer app without having to push to the repo and release, just:

  1. git clone [email protected]:blockchain/components.git
  2. cd path-to/components
  3. npm link
  4. cd path-to/my-app
  5. npm link @blockchain-com/components

:zap: you need to run npm link @blockchain-com/components everytime you run npm i or yarn...

Storybook

  1. Ensure Node version >= 8.0 is installed
  2. Install packages: npm i
  3. Start application in dev mode: npm run start
  4. The library will now be accessible at localhost:6006

Architecture

This library follows the Atomic Design principles.

An additional attention has be taken to ensure that all components are available and fully functional accross major web browsers*, as well as responsive on any screen sizes.

Browsers with > 1% usage:

  • IE 11
  • Safari 11+
  • Chrome / Edge / Firefox latest 2 major versions

Code Quality

1. Linting

The coding style rules are defined by Prettier and enforced by Eslint

The good practices™ that we follow are defined by the Javascript Standard Style

Following commands are available:

  • npm run lint:js
    • Lints JS code
  • npm run lint:css
    • Lints styled components

2. Unit Tests

Testing is done using Jest and Enzyme.

Following commands is available:

  • npm test
    • Run the unit tests

3. Git Hooks

We use Husky to automatically deploy git hooks

On every git commit and git push we run the unit tests and the linting tasks.

The commit messages are also validated and must follow the Conventional Commits spec.