import React from 'react';
import {TouchableOpacity, StyleSheet} from 'react-native';
import {SwipeActionProps} from './types';
import {useTheme} from '../../theme/ThemeContext';
/**
* Individual left swipe action component
* Extends TouchableOpacity so it accepts all touchable props
*
* @example
* ```tsx
* console.log('Action pressed')}>
*
*
* Read
*
*
* ```
*/
export const SwipeableListItemSwipeLeftAction: React.FC = ({
children,
backgroundColor,
width = 80,
style,
...touchableProps
}) => {
const {colors} = useTheme();
return (
{children}
);
};
const styles = StyleSheet.create({
actionContainer: {
height: '100%',
justifyContent: 'center',
alignItems: 'center',
paddingHorizontal: 8,
},
});