Socket
Book a DemoInstallSign in
Socket

@sishuguojixuefu/react-native-float-ball

Package Overview
Dependencies
Maintainers
5
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sishuguojixuefu/react-native-float-ball

floatBall with PanResponder

latest
Source
npmnpm
Version
0.5.4
Version published
Maintainers
5
Created
Source

react-native-float-ball

安装

$ yarn add @sishuguojixuefu/react-native-float-ball

基本使用

import FloatBall from '@sishuguojixuefu/react-native-float-ball'
<FloatBall
  onPress={() => {
    alert('点击了球')
  }}
/>

Props

prop描述
onPress球的点击事件
onLongPress球的长按事件
onDoublePress球的双击事件
ballSize球的尺寸,默认 50
left球初始距离左边的位置,默认 0
top球初始距离顶部的位置,默认 0
keepToTheSide是否靠边,默认 true
customBall自定义球

参考链接

  • PanResponder
  • React-Native PanResponder 的学习与使用
  • react-native 的 PanResponder 详解研究
  • TouchableOpacity with parent PanResponder
  • UNSAFE_componentWillMount()

Keywords

react-native

FAQs

Package last updated on 21 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts