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

mottled-core

v0.0.2-alpha

Published

A tree-shakeable library containing common reusable components for substrate based chains

Downloads

4

Readme

Mottled-library

A tree-shakeable library containing common reusable components for substrate based chains

Install and run dev

Package is using workspaces for custom build/bundle the library. Core components exist under dir packages/library. For documentation and development purposes Storybook was the tool of choice. This way contributors can catch up to speed with current components and also develop faster new ones. In order to install all required packages and execute in watch mode the library and storybook just run the command below:

yarn && yarn run dev

Usage

Principle followed in the library is to carry components and styling in different packages. This way the user of the library can decide if wants to style the components using his own css (overwrite classNames or using tailwind) or using default css.

In order to use default css see the following example:

import React, { Component } from "react"

// importing css for specific component
import 'mottled-library/css/SpecificComponent.css'

// importing the specific component
import { SpecificComponent } from "mottled-library"

class Example extends Component {
  render() {
    return (
      <>
        <SpecificComponent />
      </>
  }
}

In addition to components exists the core of the library that contains reusable variables and functions that are used from almost all components but can also be useful stand alone.

Storybook

As mentioned above, Storybook is used for documentation and development. In order to see a showcase of current components and recipes see here(Implementation pending)

Possible Errors:

error:0308010C:digital envelope routines::unsupported

An error:0308010C:digital envelope routines::unsupported occurs with the Node.js version 17 as it’s not the LTS version, and there is a breaking change in the OpenSSL. Use LTS version 16.14.0 for not facing the issue. NODE_OPTIONS could also be set, as an alternative, but is not a recommended approach (you can still try this on your local machine as a quick fix).