https://github.com/rintoj/native-x-tappable
https://github.com/rintoj/native-x-tappable
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rintoj/native-x-tappable
- Owner: rintoj
- Created: 2021-02-04T04:07:13.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-07T18:00:07.000Z (almost 5 years ago)
- Last Synced: 2025-06-11T03:37:18.066Z (about 1 year ago)
- Language: TypeScript
- Size: 147 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# native-x-tappable
[](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
{...}
}
// or with data
function MyComponent({ user }: { user: User}) {
const onTapUser = (user: User) => {
// handle action
}
return
{...}
}
```
## 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 |