# preact-combinations

> Element rendering all combinations of a provided array of prop values

Latest version **0.1.0** (published 2019-01-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install preact-combinations
pnpm add preact-combinations
yarn add preact-combinations
bun add preact-combinations
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-01-17 |
| First published | 2019-01-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | SolarLiner |
| Maintainers | solarliner |
| Keywords | preact, wrapper, combinations |

## Links

- npm: https://www.npmjs.com/package/preact-combinations
- npm.io page: https://npm.io/package/preact-combinations

## Recent versions

- 0.1.0 (latest) — 2019-01-17

## README

# preact-combinations
Pass an array of value per props; get the element rendered as all possible combinations of those props.

## Install

```bash
npm i preact-combinations
```

## Use

Pass an object of props, with each prop being an arry of potential values to take.

```tsx
const combinations = {
  color: ["red","green","blue"],
  elevation: [1,2,5,10],
  children: ["Button", "🌍"]
}
<Combinations component={Button} combinations={combinations}/>
```

Style the per-element wrapper to add gaps, etc.

```tsx
const style = {
  margin: "1em .5em"
}
<Combinations component={Button} combinations={combinations} style={style}/>
```

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