# uinz-swipe-option

Latest version **0.0.2** (published 2017-04-21) · 0 weekly downloads

## Install

```sh
npm install uinz-swipe-option
pnpm add uinz-swipe-option
yarn add uinz-swipe-option
bun add uinz-swipe-option
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2017-04-21 |
| First published | 2017-04-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | yinz |

## Links

- npm: https://www.npmjs.com/package/uinz-swipe-option
- npm.io page: https://npm.io/package/uinz-swipe-option

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^15.5.4
- [react-dom](https://npm.io/package/react-dom.md) ^15.5.4

## Recent versions

- 0.0.2 (latest) — 2017-04-21
- 0.0.1 — 2017-04-21

## README

### [oneline demo](https://uinz.github.io/swipe-option/)

<img src="https://cloud.githubusercontent.com/assets/12208108/25272728/921cbe36-26bb-11e7-9875-4d4ad22c2415.png" width="300" />


```js
class Example extends Component {
    onSelect = (v, hide) => {
        window.alert(v);
        hide();
    }
    render () {
        return (
            <div className='demo-list'>
                <style>{`
                    * {
                        box-sizing: border-box;
                    }
                    body {
                        margin: 0;
                        padding: 0;
                    }
                    .swipe-wrap {
                    }
                    .demo-item {
                        line-height: 50px;
                        padding-left: 8px;
                        border-bottom: 1px solid #e9e9e9;
                    }
                    .demo-list .delete {
                        background-color: #f30;
                        color: #fff;
                        width: 100px;
                    }
                `}</style>
                {Array(30).fill(0).map((_, i) => {
                    const options = [
                        {label: `DELETE - ${i}`, className: 'delete', value: `DELETE - ${i}`}
                    ];
                    if (i % 2) options.unshift({label: `OPT - ${i}`, className: '', value: `OPT - ${i}`});
                    return (
                        <SwipeOption key={i}
                            onSelect={this.onSelect}
                            options={options}
                            className='swipe-wrap'>
                            <div className='demo-item'>
                                List - {i}
                            </div>
                        </SwipeOption>
                    );
                })}
            </div>
        );
    }
}
```

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