# armstrong-react-types

> Rocketmakers Armstrong library of React components (For projects using npm @types from Typescript 2.0)

Latest version **1.0.0-alpha.31** (published 2016-10-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install armstrong-react-types
pnpm add armstrong-react-types
yarn add armstrong-react-types
bun add armstrong-react-types
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-alpha.31 |
| Published | 2016-10-07 |
| First published | 2016-09-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | developers@rocketmakers.com |
| Maintainers | adamrocketmakers, rocketmakers |
| Keywords | typescript, React, sass |

## Links

- npm: https://www.npmjs.com/package/armstrong-react-types
- Repository: https://github.com/Rocketmakers/armstrong-react
- Homepage: https://github.com/Rocketmakers/armstrong-react#readme
- Issues: https://github.com/Rocketmakers/armstrong-react/issues
- npm.io page: https://npm.io/package/armstrong-react-types

## Dependencies (6)

- [moment](https://npm.io/package/moment.md) ^2.15.1
- [classnames](https://npm.io/package/classnames.md) ^2.2.5
- [underscore](https://npm.io/package/underscore.md) ^1.8.3
- [@types/moment](https://npm.io/package/@types/moment.md) *
- [@types/classnames](https://npm.io/package/@types/classnames.md) *
- [@types/underscore](https://npm.io/package/@types/underscore.md) *

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0-alpha.31 (latest) — 2016-10-07
- 1.0.0-alpha.24 (next) — 2016-09-28
- 1.0.0-alpha.30 — 2016-10-07
- 1.0.0-alpha.29 — 2016-10-03
- 1.0.0-alpha.28 — 2016-10-03
- 1.0.0-alpha.27 — 2016-10-03
- 1.0.0-alpha.26 — 2016-09-28
- 1.0.0-alpha.25 — 2016-09-28
- 1.0.0-alpha.23 — 2016-09-28

## README

<p align="center">
<img src="http://armstrongcss.org/assets/logolarge.svg" width="256" height="256" />
</p>

# armstrong-react

Armstrong React - [Rocketmakers](http://www.rocketmakers.com/) React component library.

## 1.0 Breaking changes

#### Imports

All virtual classes have been removed. Don't extend armstrong classes in your css or you WILL get duplication issues. This is due to how TSX and SCSS imports work.
There are also now more files to import to cut down on size. They are self explanatory and as follows:
```
@import "~armstrong-react/dist/imports";
@import "~armstrong-react/dist/style";
@import "~armstrong-react/dist/form";
@import "~armstrong-react/dist/responsive";
@import "~armstrong-react/dist/nav";
```

#### Grid - CenterContent

Center content has been deprecated and is replaced with 2 new properties. HorizontalAlignment and Vertical alignment.

#### Grid - Fixed on row and col

Rows now take a height prop which supports either a number or the string 'auto'. Cols are the same but with a width property.
You can now also use XAML-style star widths/heights. For example a 2 col layout with `width='1*'` and a `width='2*'` would split into a 1 3rd 2 3rds ratio

#### Grid - SingleColumnRow

This is no more! Just write the markup `<Row><Col></Col></Row>` or make your own component. It was messy and unmaintainable before

#### Button

Button no longer has a text property. You can pass anything, be it text or a component as its child. Shadows have been removed by default, if you want them add the class `shadow`.
The default bottom margin has been removed to make it more flexible. Just pad your container or add `m-bottom-small` if you'd like a margin.

#### Form - Calendar & Datepickers

 - TimeSelector is no more
 - DatepickerInput has been renamed CalendarInput.
 - There are also now DateInput and TimeInput controls.
 - CalendarInput now only takes strings, so moment.js is now just an implementation detail
 - CalendarInput no longer takes a locale prop. Instead import `ArmstrongConfig` and call `setLocale` once, probably on app startup.

#### Form - Dropdownselect

Dropdownselect has been renamed to AutoCompleteInput to better reflect what it actually does

#### Form - Checkbox

CheckboxInput now takes "labelContent" which can be a string or a component. Previously it only supported a "label" string

## Introduction

A library of components for React/SCSS interface development.

>The Rokot platform components heavily rely on usage of the [typings](https://github.com/typings/typings) utility for typescript definitions management.
If you don't have `typings` installed:
```
npm i typings -g
```

## Getting Started

>WARNING!: This library assumes you're using React and SASS.

### Installation
Install via `npm`
```
npm i armstrong-react --save
```

### Typings

You will need to install these ambient dependencies:
>NOTE: you may already have some of these ambient dependencies installed!

```
typings install react underscore classnames node -SA
```

## Importing the SCSS

To make use of the default styles, you'll need to import a single SCSS entry point from the module into your root stylesheet. The simplest way of achieving this is to use [webpack](https://webpack.github.io)'s [sass-loader](https://github.com/jtangelder/sass-loader) plugin and add the following line to your root SCSS file:
```scss
@import "~armstrong-react/dist/style";
```
>NOTE: If you're not using webpack, you can use an absolute or relative path through your node_modules folder.

## Example: Adding a simple Armstrong Button (TypeScript/JSX):

```javascript
import * as React from 'react';
import * as ReactDOM from 'react-dom';

import { Button } from "armstrong-react";

export class MyComponent extends React.Component<{}, {}> {

  private buttonClicked(e) {
    console.log('Clicked!')
  }

  public render() {
    return (
      <main>
        <h1>Below is a button!</h1>
        <Button condition="info" onClick={ this.buttonClicked }>Armstrong lives!</Button>
      </main>
    );
  }
}
```

## Workbench folder?
Don't worry about this ;)

## Consumed Libraries

#### [Underscore](http://underscorejs.org)
#### [Classnames](https://github.com/JedWatson/classnames)

---
_Source: https://npm.io/package/armstrong-react-types · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
