New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nib-components/prototype

Package Overview
Dependencies
Maintainers
89
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nib-components/prototype

A single script and style bundle for prototyping. Includes react, react-dom and *almost* all our components.

  • 1.1.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
89
Created
Source

@nib-components/prototype

A single script and style bundle for rapid prototyping. Includes react, react-dom and almost all our components.

Caution: NEVER use it in a real application!

Using it in production will add a lot of unnecessary bloat to your app and result in sub-optimal page-load times.

Usage

CodePen

Create a new CodePen from our template CodePen.

Roll-your-own

<html class="flexbox">
  <head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>nib Prototype</title>
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700,800|Roboto:300,400,700"/>
  </head>
  <body>
    <div id="app"/>
    <script src="https://unpkg.com/@nib-components/prototype/dist/prototype.js"></script>
    <script type="text/babel">
      ReactDOM.render(
        <Padding all={6}>
          <Heading size={1}>Hello World!</Heading>
          <Margin top={3}>
            <PrimaryButton>Click me!</Button>
          </Margin>
        </Padding>,
        document.getElementById('app')
      );
    </script>
  </body>
</html>

Packages that have a single default export will be accessible on the window using their display name e.g. @nib-components/heading will be accessible via window.Heading (or just Heading)

Packages that do not have a single default export will be accessible on the window using their package name and will require a little extra effort to use with react e.g. @nib-components/table will be accessible via window.table (or just table and usable like:

const {Table, Row, Cell} = table;
<Table>...</Table>

Updating

When changes have been made to any of the components in the DLS, or a new component has been added to the DLS, this repo will require updating. To update this repo:

  1. Install the latest versions of all the DLS components

npm-check -u is a helpful utility for updating package versions

Make sure you save the updated versions in package.json

  1. Edit the version in package.json and increase the minor version

Bumping the minor version also means resetting the patch version e.g. 0.2.3 to 0.3.0

  1. Commit and push your changes
  2. Run npm publish
  3. Update the template CodePen to use the most recently published version of this package from unpkg.com
  • Settings > JavaScript and update the version number in the URL

Use the exact version number so existing CodePens will continue working regardless of recent breaking changes.

Change log

1.1.0

  • update - bump all components to use monorepo components.

1.0.0

  • update - remove css dependency and bump all components to use styled-components versions.

FAQs

Package last updated on 06 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc