# native-x-tappable

> A component to wrap around other components for tap action

Latest version **1.0.4** (published 2021-07-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install native-x-tappable
pnpm add native-x-tappable
yarn add native-x-tappable
bun add native-x-tappable
```

## 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.4 |
| Published | 2021-07-07 |
| First published | 2021-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Rinto Jose |
| Maintainers | rintoj |

## Links

- npm: https://www.npmjs.com/package/native-x-tappable
- Repository: https://github.com/rintoj/native-x-tappable
- Homepage: https://github.com/rintoj/native-x-tappable#readme
- Issues: https://github.com/rintoj/native-x-tappable/issues
- npm.io page: https://npm.io/package/native-x-tappable

## Recent versions

- 1.0.4 (latest) — 2021-07-07
- 1.0.3 — 2021-05-20
- 1.0.2 — 2021-02-16
- 1.0.1 — 2021-02-06
- 1.0.0 — 2021-02-04

## README

# native-x-tappable

[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

Wrap this component around another component to enable user interaction

## Install

### Yarn

```sh
yarn add native-x-tappable
```

### NPM

```sh
npm install native-x-tappable
```

## Usage

```tsx
import { Tappable } from 'native-x-tappable'

function MyComponent() {
  const onTap = () => {
    // handle action
  }
  return <Tappable onTap={onTap}>
    {...}
  </Tappable>
}

// or with data

function MyComponent({ user }: { user: User}) {
  const onTapUser = (user: User) => {
    // handle action
  }
  return <Tappable data={user} onTap={onTapUser}>
    {...}
  </Tappable>
}
```

## API

| Property                     | Default Value | Usage                                                  |
| ---------------------------- | ------------- | ------------------------------------------------------ |
| disable?: boolean            | false         | Prevents all user interaction while this value is true |
| feedback?: boolean           | false         | Show a visible feedback                                |
| style: ViewStyle             |               | Additional style                                       |
| children: ReactNode/[]       |               | Content                                                |
| onTap: (data: TData) => void |               | Action handler for user interaction                    |
| data: TData                  | undefined     | Optional data                                          |

## Automatic Release

Here is an example of the release type that will be done based on a commit messages:

| Commit message      | Release type          |
| ------------------- | --------------------- |
| fix: [comment]      | Patch Release         |
| feat: [comment]     | Minor Feature Release |
| perf: [comment]     | Major Feature Release |
| doc: [comment]      | No Release            |
| refactor: [comment] | No Release            |
| chore: [comment]    | No Release            |

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