// HOC to add a paste button to a text input import * as React from 'react' import { StyleSheet, TextInputProps, View, ViewStyle } from 'react-native' import TouchableDefault from 'src/components/Touchable' import { PasteAwareWrappedElementProps, withPasteAware } from 'src/components/WithPasteAware' import Paste from 'src/icons/Paste' import Colors from 'src/styles/colors' import { iconHitslop } from 'src/styles/variables' export default function withTextInputPasteAware

( WrappedTextInput: React.ComponentType

, pasteIconContainerStyle?: ViewStyle ) { class Wrapper extends React.Component

{ render() { const { isPasteIconVisible, onPressPaste } = this.props return ( {isPasteIconVisible && ( )} ) } } return withPasteAware(Wrapper) } const styles = StyleSheet.create({ container: { position: 'relative', }, pasteIconContainer: { backgroundColor: Colors.backgroundPrimary, position: 'absolute', right: 11, top: 13, padding: 4, width: 20, height: 25, zIndex: 100, }, })