import { useCallback } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import Sortable from 'react-native-sortables';
const DATA = Array.from({ length: 4 }, (_, index) => `Item ${index + 1}`);
export default function CustomHandleExample() {
const renderItem = useCallback(
({ item }: { item: string }) => (
{item}
{/* Wraps the handle component */}
{/* highlight-next-line */}
::
{/* highlight-next-line */}
),
[]
);
return (
);
}
const styles = StyleSheet.create({
card: {
alignItems: 'center',
backgroundColor: '#2e8555',
borderRadius: 12,
flexDirection: 'row',
justifyContent: 'center',
padding: 24
},
container: {
padding: 16
},
handle: {
backgroundColor: 'rgba(0,0,0,0.2)',
borderRadius: 5,
padding: 10
},
handleText: {
color: 'white',
fontWeight: 'bold'
},
text: {
color: 'white',
flex: 1,
fontWeight: 'bold'
}
});