Skip to content

Commit f66a7f0

Browse files
committed
2 parents b01f6e5 + ebb7f00 commit f66a7f0

File tree

1 file changed

+32
-7
lines changed

1 file changed

+32
-7
lines changed

README.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,38 @@ Here's a simple example to get you started:
8181
```jsx
8282
import { EAnimationType, SwipeableItemWrapper } from 'react-native-swipe-reveal';
8383

84-
<SwipeableItemWrapper
85-
id="unique-id"
86-
animationType={EAnimationType['left-swipe']}
87-
leftSwipeView={<YourUnderlyingComponent />}
88-
>
89-
<YourItemComponent />
90-
</SwipeableItemWrapper>
84+
<SwipeableItemWrapper
85+
id={'123'}
86+
animationType={EAnimationType['left-swipe']}
87+
leftSwipeView={
88+
<View style={{flexDirection: 'row', height: '100%'}}>
89+
<TouchableOpacity
90+
style={[
91+
{
92+
backgroundColor: 'red',
93+
paddingHorizontal: 20,
94+
borderRadius: 10,
95+
},
96+
]}>
97+
<Text>Left 1</Text>
98+
</TouchableOpacity>
99+
<TouchableOpacity
100+
style={[
101+
{
102+
backgroundColor: 'cyan',
103+
paddingHorizontal: 20,
104+
borderRadius: 10,
105+
},
106+
]}>
107+
<Text>Left 2</Text>
108+
</TouchableOpacity>
109+
</View>
110+
}>
111+
<View style={{height: 100, backgroundColor: 'green'}}>
112+
<Text>{'Title'}</Text>
113+
<Text>{'Desc'}</Text>
114+
</View>
115+
</SwipeableItemWrapper>
91116
```
92117

93118
## Animation Types

0 commit comments

Comments
 (0)