|
|
|
@ -1,5 +1,4 @@
@@ -1,5 +1,4 @@
|
|
|
|
|
import React, { FC } from 'react' |
|
|
|
|
|
|
|
|
|
import { useTheme } from '@/shared/hooks/use-theme.hook' |
|
|
|
|
import { PartialTheme } from '@/shared/themes/interfaces' |
|
|
|
|
import { |
|
|
|
@ -7,6 +6,7 @@ import {
@@ -7,6 +6,7 @@ import {
|
|
|
|
|
Text, |
|
|
|
|
TextStyle, |
|
|
|
|
TouchableOpacity, |
|
|
|
|
TouchableWithoutFeedback, |
|
|
|
|
View, |
|
|
|
|
ViewStyle, |
|
|
|
|
} from 'react-native' |
|
|
|
@ -42,28 +42,33 @@ export const TouchableFakeInput: FC<IProps> = ({
@@ -42,28 +42,33 @@ export const TouchableFakeInput: FC<IProps> = ({
|
|
|
|
|
<View style={[styles.container, style]}> |
|
|
|
|
<Txt style={styles.label}>{label}</Txt> |
|
|
|
|
|
|
|
|
|
<TouchableOpacity |
|
|
|
|
disabled={disabled} |
|
|
|
|
style={onCls(Boolean(error), 'inputWrap')} |
|
|
|
|
onPress={onPress}> |
|
|
|
|
{needCopy && ( |
|
|
|
|
<IconComponent |
|
|
|
|
name={iconName} |
|
|
|
|
size={$size(20, 18)} |
|
|
|
|
style={styles.iconLeft} |
|
|
|
|
color={theme.iconComponent.$primaryColor} |
|
|
|
|
/> |
|
|
|
|
)} |
|
|
|
|
<Text style={[styles.value, txtStyle]}>{value}</Text> |
|
|
|
|
<TouchableWithoutFeedback onLongPress={() => CopyToBuffer(value)}> |
|
|
|
|
<View> |
|
|
|
|
<TouchableOpacity |
|
|
|
|
disabled={disabled} |
|
|
|
|
style={onCls(Boolean(error), 'inputWrap')} |
|
|
|
|
onLongPress={() => CopyToBuffer(value)} |
|
|
|
|
onPress={onPress}> |
|
|
|
|
{needCopy && ( |
|
|
|
|
<IconComponent |
|
|
|
|
name={iconName} |
|
|
|
|
size={$size(20, 18)} |
|
|
|
|
style={styles.iconLeft} |
|
|
|
|
color={theme.iconComponent.$primaryColor} |
|
|
|
|
/> |
|
|
|
|
)} |
|
|
|
|
<Text style={[styles.value, txtStyle]}>{value}</Text> |
|
|
|
|
|
|
|
|
|
<IconComponent |
|
|
|
|
name={needCopy ? 'copy' : iconName} |
|
|
|
|
size={$size(20, 18)} |
|
|
|
|
btnStyle={styles.icon} |
|
|
|
|
color={theme.iconComponent.$primaryColor} |
|
|
|
|
onPress={() => CopyToBuffer(value)} |
|
|
|
|
/> |
|
|
|
|
</TouchableOpacity> |
|
|
|
|
<IconComponent |
|
|
|
|
name={needCopy ? 'copy' : iconName} |
|
|
|
|
size={$size(20, 18)} |
|
|
|
|
btnStyle={styles.icon} |
|
|
|
|
color={theme.iconComponent.$primaryColor} |
|
|
|
|
onPress={() => CopyToBuffer(value)} |
|
|
|
|
/> |
|
|
|
|
</TouchableOpacity> |
|
|
|
|
</View> |
|
|
|
|
</TouchableWithoutFeedback> |
|
|
|
|
|
|
|
|
|
{error && <Text style={styles.error}>{error}</Text>} |
|
|
|
|
</View> |
|
|
|
|