# webdep-react-controls

> React form controls wrappers components

Latest version **0.12.14** (published 2019-09-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install webdep-react-controls
pnpm add webdep-react-controls
yarn add webdep-react-controls
bun add webdep-react-controls
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.12.14 |
| Published | 2019-09-09 |
| First published | 2019-02-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Andrii Adamets |
| Maintainers | andriiadamets |

## Links

- npm: https://www.npmjs.com/package/webdep-react-controls
- Repository: git@github.com:AndriiAdamets/react-controls
- npm.io page: https://npm.io/package/webdep-react-controls

## Dependencies (5)

- [react](https://npm.io/package/react.md) ^16.7.0
- [react-dom](https://npm.io/package/react-dom.md) ^16.7.0
- [classnames](https://npm.io/package/classnames.md) ^2.2.6
- [prop-types](https://npm.io/package/prop-types.md) ^15.6.2
- [react-addons-css-transition-group](https://npm.io/package/react-addons-css-transition-group.md) ^15.6.2

## Recent versions

- 0.12.14 (latest) — 2019-09-09
- 0.12.13 — 2019-07-19
- 0.12.12 — 2019-07-18
- 0.12.11 — 2019-07-18
- 0.12.10 — 2019-07-18
- 0.12.9 — 2019-07-18
- 0.12.8 — 2019-06-26
- 0.12.7 — 2019-06-26
- 0.12.6 — 2019-06-26
- 0.12.5 — 2019-06-25
- 0.12.4 — 2019-06-25
- 0.12.3 — 2019-06-25
- 0.12.2 — 2019-06-19
- 0.12.1 — 2019-06-10
- 0.12.0 — 2019-06-10
- … 12 more at https://npm.io/package/webdep-react-controls/versions

## README

# webdep-react-controls
React wrappers for form controls
## installation

Using npm:
```
npm install webdep-react-controls --save
```

Using yarn:
```
yarn add webdep-react-controls
```

## Styles
You should import styles separately from `webdep-react-controls/build/lib/styles.css`, or, if You using `sass` in your project,
just add `@import "~webdep-react-controls/src/lib/styles/styles.scss"`

## Components documentation
You can find detailed documentation for components in `webdep-react-controls/build/docs/index.html`.

## Components

### Button
Button component is simple wrapper for regular button.

#### Customization
To customize button styles just write styles from `wrc-button` class, or you can overwrite some sass variables:
```
$btn-font-size, $btn-darken-percentage, $btn-lighten-percentage, $button-border-radius, $button-border-style, button-border-width, $link-color, $link-color-hover, $link-color-disabled,
```

#### Props

| Name     | Type                                                                                                       | Default Value | Description                       |
|----------|------------------------------------------------------------------------------------------------------------|---------------|-----------------------------------|
| disabled | PropTypes.bool                                                                                             |               | Is button disabled                |
| type     | PropTypes.oneOf(['button', 'submit', 'link', 'label'])                                                     | 'button'      | Button type                       |
| state    | PropTypes.oneOf(['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark', 'link']) | 'primary'     | responsible for button background |
| size     | PropTypes.oneOf(['small', 'medium', 'big',])                                                               | 'medium'      | Button size                       |
| onClick  | PropTypes.func                                                                                             |               | Button click callback             |

### Card

### Dialog

### Input

### Paginator

### Select
Customized select control. It has options list, which appends to top of dom tree by `createPortal` function.

#### Customization
To customize select styles just write styles from `wrc-select` class, or you can overwrite some sass variables:
```
$options-list-max-height, $select-list-max-height, $select-height, $select-background-color, $options-list-background-color, $options-list-border-color, $options-border-width, $options-list-border-top-left-radius, $options-list-border-top-right-radius, $options-list-border-bottom-left-radius, $options-list-border-bottom-right-radius, $option-padding, $option-color, $option-border-bottom, $option-focused-color, $option-focused-bg, $option-selected-color, $option-selected-bg, $dropdown-z-index
```

#### Props

| Name                 | Type             | Default Value              | Description                                                                                                                                 |
|----------------------|------------------|----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
| options              | PropTypes.array  |                            | Select options list                                                                                                                         |
| enableSearch         | PropTypes.bool   |                            | If it is true, then search input will be displayed                                                                                          |
| optionNameFn         | PropTypes.func   |                            | Function to customize displaying select options in options list                                                                             |
| nameAccessor         | PropTypes.string | 'name'                     | If don't use optionNameFn, nameAccessor shold be key of option Name                                                                         |
| valueAccessor        | PropTypes.string | 'id'                       | Key, which contain value of option object                                                                                                   |
| triggerClassName     | PropTypes.string |                            | Class name of div, which display select placeholder or selected value                                                                       |
| optionsListClassName | PropTypes.string | 'wrc-select__options-list' |                                                                                                                                             |
| searchFn             | PropTypes.func   |                            | Function, which get search input value, current option and select props, which should return true if option satisfies the search conditions |

### Table

### Tooltip
Use tooltips for displaying some addition information, validation messages, e.t.c

#### Customization
To customize tooltip styles just write styles from `wrc-tooltip` class, or you can overwrite some sass variables:
```
$tooltip-border-radius, $tooltip-z-index, $tooltip-padding, $tooltip-caret-botder
```

#### Props

| Name      | Type                                                                                                       | Default Value | Description                                |
|-----------|------------------------------------------------------------------------------------------------------------|---------------|--------------------------------------------|
| position  | PropTypes.oneOf(['top', 'bottom', 'right', 'left'])                                                        | 'top'         | Is tooltip on top or on bottom from target |
| state     | PropTypes.oneOf(['primary', 'secondary', 'success', 'danger', 'warning', 'info', 'light', 'dark', 'link']) | 'dark'        | Tooltip background color                   |
| body      | ropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.func])                                   |               | Tooltip message                            |
| bodyStyle | PropTypes.object                                                                                           |               |                                            |

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