1.0.4 • Published 4 years ago
native-x-tappable v1.0.4
native-x-tappable
Wrap this component around another component to enable user interaction
Install
Yarn
yarn add native-x-tappableNPM
npm install native-x-tappableUsage
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 |