# @y2z/dropdown-components

> drop down for components

Latest version **0.1.1** (published 2019-02-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @y2z/dropdown-components
pnpm add @y2z/dropdown-components
yarn add @y2z/dropdown-components
bun add @y2z/dropdown-components
```

## 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.1.1 |
| Published | 2019-02-28 |
| First published | 2019-02-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 11.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Aashish Karki |
| Maintainers | y2z |

## Links

- npm: https://www.npmjs.com/package/@y2z/dropdown-components
- Repository: git@github.com:karkipy/dropdown-component
- npm.io page: https://npm.io/package/@y2z/dropdown-components

## Dependencies (2)

- [react](https://npm.io/package/react.md) >=16.8.0
- [webpack](https://npm.io/package/webpack.md) ^2.6.1

## Recent versions

- 0.1.1 (latest) — 2019-02-28
- 0.1.0 — 2019-02-27

## README

## DropDown Component

A react component to display components according to a value selected.

## Installation

```bash
  yarn add @y2z/dropdown-components
```

## Usage

```javascript
  import DropDown from 'component-drop-down';
  import Selection from './Selection';

  class Example {

    render() {

      return (
        <DropDown
          style={{ width: '100%' }}
          data={[ { title: 'Selection', component: <Selection />}]}
          optionHeader="-- select sorting algorithm --"
          componentStyle={{}}
        />
      )
    }
  }

```

## Parameters

 - style: style object for the select element
 - data: An array of object containing title (string ) and the component to render
 - optionHeader: the default option in a select if not provided will be empty
 - componentStyle: style object for the component container

## Output

<img width="979" alt="screen shot 2019-02-27 at 12 31 49 pm" src="https://user-images.githubusercontent.com/12614476/53471096-b733c800-3a8b-11e9-9cea-588992bd13ad.png">

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