@areatechnology/shields-react
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

Shields React Components

Installation

To install with npm:

npm install @areatechnology/shields-react

To install with yarn:

yarn add @areatechnology/shields-react

Usage

There are 5 components available, each rendering an SVG at 100% of the width and height of the parent container. You can pass in additional props into any of these components to add to the SVG.

Shield

import { Shield } from '@areatechnology/shields-react';

<Shield fieldId={...} colors={...} hardwareId={...} frameId={...} />

Renders an SVG with the configured shield.

fieldId must be a number between 0 and 299. colors must be an array of 4 strings with hex colors. hardwareId must be a number between 0 and 120. frameId must be a number between 0 and 5.

ShieldID

import { ShieldID } from '@areatechnology/shields-react';

<ShieldID shieldId={...} />

Renders an SVG with the specified shield based on the Shields collection.

shieldId must be between 1 and 5000.

If a Shield has not yet been built, a placeholder shield will be rendered.

Field

import { Field } from '@areatechnology/shields-react';

<Field fieldId={...} colors={...} />

Renders an SVG with the configured Field.

fieldId must be a number between 0 and 299. colors must be an array of 4 strings with hex colors.

Hardware

import { Hardware } from '@areatechnology/shields-react';

<Hardware hardwareId={...} />

Renders an SVG with the configured Hardware.

hardwareId must be a number between 0 and 120.

Frame

import { Frame } from '@areatechnology/shields-react';

<Frame frameId={...}/>

Renders an SVG with the configured frame.

frameId must be a number between 0 and 5.

Readme

Keywords

none

Package Sidebar

Install

npm i @areatechnology/shields-react

Weekly Downloads

6

Version

0.1.3

License

Unlicense

Unpacked Size

3.97 MB

Total Files

26

Last publish

Collaborators

  • shahruz
  • jcpalmer