# webmotors-webwidgets

> Component Webmotors WebWidgets

Latest version **1.0.2** (published 2019-06-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install webmotors-webwidgets
pnpm add webmotors-webwidgets
yarn add webmotors-webwidgets
bun add webmotors-webwidgets
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-06-05 |
| First published | 2019-06-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 51.5 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| Author | @webmotors |
| Maintainers | figuarnieri |
| Keywords | webmotors |

## Links

- npm: https://www.npmjs.com/package/webmotors-webwidgets
- npm.io page: https://npm.io/package/webmotors-webwidgets

## Dependencies (5)

- [axios](https://npm.io/package/axios.md) ^0.18.0
- [react](https://npm.io/package/react.md) ^16.4.2
- [webmotors-svg](https://npm.io/package/webmotors-svg.md) ^1.0.25
- [react-chartist](https://npm.io/package/react-chartist.md) ^0.13.3
- [react-router-dom](https://npm.io/package/react-router-dom.md) ^5.0.0

## Recent versions

- 1.0.2 (latest) — 2019-06-05
- 1.0.1 — 2019-06-04

## README

# Webmotors Cockpit WebWidgets

## Instalando componente
> Instale o componente `webmotors-webwidgets`

```bash
npm i webmotors-widgets
```

## Usando o Componente <Widgets>

```jsx
import WebWidgets from 'webmotors-webwidgets';

...

<WebWidgets
    name="Faturamento"
    url="/url-api"
    id={1}
    type={1}
/>
```

## Props do componente <WebWidgets>

### name (string)
Título que será exibido no Widget

### url (string)
URL que chamará a Api do Obejto de dados do Widget

### id (number)
ID do Widget

### type (number)
Tipo do Gráfico que será renderizado

1. Barra

2. Linha

3. Indicador

4. Funil

5. Pizza

6. Velocímetro

7. BarraLinha

## Retorno esperado no Cockpit

```json
{
    "data": {
        "grafico": [
            { "titulo": "string", "valor": ["string"], "corTexto": "string", "corFundo": "string" },
            { "titulo": "string", "valor": ["string"], "corTexto": "string", "corFundo": "string" },
        ],
        "descricao": ["string"],
        "infoExtra": [
             { "valor": 99, "texto": "string", "porcentagem": 99 },
             { "valor": 99, "texto": "string", "porcentagem": 99 },
             { "valor": 99, "texto": "string", "porcentagem": 99 }
        ],
        "link": "string",
        "icone": {
            "svg": "string",
            "png": "string"
        },
        "escuro": true,
        "vertical": true
    },
    "status": 200,
    "success": true
}
```

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