Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@arlenwang/react-native-swipeout
Advanced tools
iOS-style swipeout buttons that appear from behind a component
npm install --save @arlenwang/react-native-swipeout
原项目因为不更新了,因为这个比较简单实用,所以重新修整发包
See example/index.ios.js for a more detailed example. See the Wiki usage tips. To use swipeout behind a iOS-style listitem, try react-native-listitem.
import Swipeout from '@arlenwang/react-native-swipeout';
// Buttons
var swipeoutBtns = [
{
text: 'Button'
}
]
// Swipeout component
<Swipeout right={swipeoutBtns}>
<View>
<Text>Swipe me left</Text>
</View>
</Swipeout>
Prop | Type | Optional | Default | Description |
---|---|---|---|---|
autoClose | bool | Yes | false | auto close on button press |
backgroundColor | string | Yes | '#dbddde' | |
close | bool | Yes | close swipeout | |
disabled | bool | Yes | false | whether to disable the swipeout |
left | array | Yes | [] | swipeout buttons on left |
onOpen | func | Yes | (sectionID, rowId, direction: string) => void | |
onClose | func | Yes | (sectionID, rowId, direction: string) => void | |
right | array | Yes | [] | swipeout buttons on right |
scroll | func | Yes | prevent parent scroll | |
style | style | Yes | style of the container | |
sensitivity | number | Yes | 50 | change the sensitivity of gesture |
sensitivityBlock | number | Yes | 5 | x移动需要大于多少倍y轴移动 |
buttonWidth | number | Yes | each button width |
Prop | Type | Optional | Default | Description |
---|---|---|---|---|
backgroundColor | string | Yes | '#b6bec0' | background color |
color | string | Yes | '#ffffff' | text color |
component | ReactNode | Yes | null | pass custom component to button |
onPress | func | Yes | null | function executed onPress |
text | string | Yes | 'Click Me' | text |
type | string | Yes | 'default' | default, delete, primary, secondary |
underlayColor | string | Yes | null | button underlay color on press |
disabled | bool | Yes | false | disable button |
FAQs
iOS-style swipeout buttons behind component
The npm package @arlenwang/react-native-swipeout receives a total of 1 weekly downloads. As such, @arlenwang/react-native-swipeout popularity was classified as not popular.
We found that @arlenwang/react-native-swipeout demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.