@roboholix/shared-components v0.2.0
Roboholix - Shared Components - :robot: :beers: :robot:
A set of React components used to build the Roboholix robotics streaming platform.
Platform | CI Status |
---|---|
Linux | |
OSX | |
Windows |
Documentation (Live Demo)
See a live demo of the components and their respective documentation used at Roboholix.com.
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/shared-components
Components
See the component browser demo for up-to-date
documentation and examples using latest version of @roboholix/shared-components
.
- ArcadeButton
- ArcadeButtons
- Button
- DirectionalPad
- GameInterface
- LoadingSpinner
- Logo
- Overlay
- VideoFeed
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 Syntax | Example Code | Production | Development |
---|---|---|---|
import | import ArcadeButton from '@roboholix/shared-components/ArcadeButton'; | ✔ | ✔ |
import | import { ArcadeButton } from '@roboholix/shared-components'; | ✗ | ✔ |
require | const ArcadeButton = require('@roboholix/shared-components/ArcadeButton'); | ✔ | ✔ |
require | const ArcadeButton = require('@roboholix/shared-components').ArcadeButton; | ✗ | ✔ |
Importing Multiple Components
// To only import code you need, you can import each individual component on their own
import ArcadeButtons from '@roboholix/shared-components/ArcadeButton';
import DirectionalPad from '@roboholix/shared-components/DirectionalPad';
:warning: The following syntax will import the entire library (an additional ~5kb), instead of only code needed only for the components specified
// Add ArcadeButtons and DirectionalPad to your project with ES module syntax
import { ArcadeButtons, DirectionalPad } from '@roboholix/shared-components';
// Add ArcadeButtons and DirectionalPad to your project with CommonJS syntax
const RoboholixComponents = require('@roboholix/shared-components');
const ArcadeButton = RoboholixComponents.ArcadeButton;
const DirectionalPad = RoboholixComponents.DirectionalPad;
const RoboholixComponents = require('@roboholix/shared-components');
const {
ArcadeButton,
DirectionalPad
} = RoboholixComponents;
Bug Reporting
Click here to report any bugs or open an issue with this package.
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago