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

non-functionals-react

v0.2.5

Published

A set of components available via the NPM registry for easy integration into any UNIT9 project using React.

Downloads

33

Readme

Non Functionals React

A set of simple React components for non functional pages that are easy to implement within any React project. Just pass in the props needed to suit your project and even access the css classes for more advanced customisation.

Installation:

npm i non-functionals-react --save

Available Components:

  • Not Found
  • Rotate Device
  • Unsupported
  • WebGL Not Enabled
  • Window Too Small
  • Build Version

Usage:

Simply import the components you need:

import { NotFound, RotateDevice } from 'non-functionals-react';

and add them to your render method:

<NotFound
  title="OOPS!"
  subtitle="Sorry, something has gone wrong."
  description="We can't find what you're looking for."
  cta="Back to Home"
  onContinue={() => console.log('continue')}
/>

Components:

Not Found:

Props:

| prop | type | required | | ------------------ | ------ | -------- | | icon | string | no | | title | string | yes | | subtitle | string | yes | | description | string | yes | | cta | string | yes | | onContinue | function | yes |

HTML structure:
<div class="NotFound NonFunctionals">
  <img class="NotFound-Icon" />
  <h1 class="NotFound-Title" />
  <h2 class="NotFound-Subtitle" />
  <p class="NotFound-Description" />
  <button class="NotFound-Cta" />
</div>

Rotate Device:

Props:

| prop | type | required | | ------------------ | ------ | -------- | | mobileOrientation | string | yes | | mobileIcon | string | no | | mobileTitle | string | yes | | tabletOrientation | string | yes | | tabletIcon | string | no | | tabletTitle | string | yes |

HTML structure:
<div class="RotateDevice NonFunctionals">
  <img class="RotateDevice-Icon" />
  <h1 class="RotateDevice-Title" />
</div>

Unsupported:

Props:

| prop | type | required | | ---------------------- | ------ | -------- | | supported | object | yes | | icon | string | no | | unsupportedIcons | array | yes | | unsupportedIconsMobile | array | yes | | title | string | yes | | mobileTitle | string | yes | | description | string | yes | | mobileDescription | string | yes | | socialInstructions | string | yes | | cta | string | yes |

Note:

The supported prop must follow this pattern:

{
  desktop: [
    { browser: 'chrome', minVersion: 2 },
    { browser: 'safari', minVersion: 9 },
    { browser: 'firefox', minVersion: 56 },
    { browser: 'ie', minVersion: 11 },
    { browser: 'edge', minVersion: 14 },
  ],
  tablet: [
    { os: 'ios', browser: 'mobile safari' },
    { os: 'android', browser: 'chrome' },
  ],
  mobile: [
    { os: 'ios', browser: 'mobile safari' },
    { os: 'android', browser: 'chrome' },
  ],
}

The unsupportedIcons and unsupportedIconsMobile props must follow this pattern:

  { image: 'url', label: 'Optional label' },

Please adjust ONLY the following properties to fit your specific project:

  • Desktop: browser, minVersion
  • Tablet: os, browser
  • Mobile: os, browser
HTML structure:
<div class="Unsupported NonFunctionals">
  <img class="Unsupported-Icon" />
  <h1 class="Unsupported-Title" />
  <div class="Unsupported-UnsupportedIcons">
    <div>
      <img />
      <span>{Label}</span>
    </div>
  </div>
  <p class="Unsupported-Description" />
  <p class="Unsupported-SocialInstructions" />
  <button class="Unsupported-Cta" />
</div>

WebGL Not Enabled:

Props:

| prop | type | required | | ------------------ | ------ | -------- | | icon | string | no | | title | string | yes | | description | string | yes |

HTML structure:
<div class="WebGLNotEnabled NonFunctionals">
  <img class="WebGLNotEnabled-Icon" />
  <h1 class="WebGLNotEnabled-Title" />
  <p class="WebGLNotEnabled-Description" />
</div>

Window Too Small:

Props:

| prop | type | required | | ------------------ | ------ | -------- | | minWidth | number | yes | | minHeight | number | yes | | icon | string | no | | title | string | yes | | description | string | yes |

HTML structure:
<div class="WindowTooSmall NonFunctionals">
  <img class="WindowTooSmall-Icon" />
  <h1 class="WindowTooSmall-Title" />
  <p class="WindowTooSmall-Description" />
</div>

Build Version:

| prop | type | required | description | | ------- | ------ | -------- | ----------- | | version | string | yes | | live | bool | yes | if true then component will be hidden |

Note:

The version prop should follow this format:

v {build number} built on {new Date().toGMTString()}

Running locally:

Simply run npm i followed by npm start