0.0.3 • Published 4 years ago

@roboholix/component-browser v0.0.3

Weekly downloads
-
License
UNLICENSED
Repository
github
Last release
4 years ago

A set of React components

PlatformCI Status
LinuxLinux Build Status
OSXOSX Build Status
WindowsWindows Build status

Documentation (Live Demo)

See a live demo of the components and their respective documentation.

The demo component browser includes:

  • Rendered example components that are included in this library
  • Code snippets used to generate the example components
  • Component prop options, including default values and requirements

Installation

npm install @roboholix/component-browser

Components

See the component browser demo for up-to-date documentation and examples using latest version of @roboholix/component-browser.

Useage

Importing Individual Components

Choose one of the following ways to import or require a component into your project.

:point_right: Examples marked for production use will only import code needed for the specified component

Module SyntaxExample CodeProductionDevelopment
importimport MyButton from '@roboholix/component-browser/MyButton';
importimport { MyButton } from '@roboholix/component-browser';
requireconst MyButton = require('@roboholix/component-browser/MyButton');
requireconst MyButton = require('@roboholix/component-browser').MyButton;

Importing Multiple Components

// To only import code you need, you can import each individual component on their own
import MyButton from '@roboholix/component-browser/MyButton';
import MyHeader from '@roboholix/component-browser/MyHeader';

:warning: The following syntax will import the entire library (an additional ~5kb), instead of only code needed only for the components specified

// Add MyButton and MyHeader to your project with ES module syntax
import { MyButton, MyHeader } from '@roboholix/component-browser';
// Add MyButton and MyHeader to your project with CommonJS syntax
const RoboholixComponents = require('@roboholix/component-browser');

const MyButton = RoboholixComponents.MyButton;
const MyHeader = RoboholixComponents.MyHeader;
const RoboholixComponents = require('@roboholix/component-browser');

const {
  MyButton,
  MyHeader
} = RoboholixComponents;

Bug Reporting

Click here to report any bugs or open an issue with this package.