mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-12 10:30:36 +01:00
OPS: Lint
This commit is contained in:
parent
b9090191a3
commit
6b9bf33dfa
5 changed files with 10 additions and 10 deletions
|
@ -1,11 +1,10 @@
|
||||||
import React, { forwardRef } from 'react';
|
import React, { forwardRef } from 'react';
|
||||||
import { StyleProp, StyleSheet, Text, TouchableOpacity, View, ViewStyle } from 'react-native';
|
import { StyleProp, StyleSheet, Text, TouchableOpacity, TouchableOpacityProps, View, ViewStyle } from 'react-native';
|
||||||
import { Icon } from '@rneui/themed';
|
import { Icon } from '@rneui/themed';
|
||||||
|
|
||||||
import { useTheme } from './themes';
|
import { useTheme } from './themes';
|
||||||
|
|
||||||
// Define an interface for the props
|
interface ButtonProps extends TouchableOpacityProps {
|
||||||
interface ButtonProps {
|
|
||||||
backgroundColor?: string;
|
backgroundColor?: string;
|
||||||
buttonTextColor?: string;
|
buttonTextColor?: string;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
@ -20,7 +19,7 @@ interface ButtonProps {
|
||||||
onPress?: () => void;
|
onPress?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Button = forwardRef<TouchableOpacity, ButtonProps>((props, ref) => {
|
export const Button = forwardRef<React.ElementRef<typeof TouchableOpacity>, ButtonProps>((props, ref) => {
|
||||||
const { colors } = useTheme();
|
const { colors } = useTheme();
|
||||||
|
|
||||||
let backgroundColor = props.backgroundColor ?? colors.mainColor;
|
let backgroundColor = props.backgroundColor ?? colors.mainColor;
|
||||||
|
@ -56,6 +55,7 @@ export const Button = forwardRef<TouchableOpacity, ButtonProps>((props, ref) =>
|
||||||
accessibilityRole="button"
|
accessibilityRole="button"
|
||||||
onPress={props.onPress}
|
onPress={props.onPress}
|
||||||
disabled={props.disabled}
|
disabled={props.disabled}
|
||||||
|
{...props}
|
||||||
>
|
>
|
||||||
{buttonView}
|
{buttonView}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
|
@ -19,7 +19,7 @@ const styleCopyTextToClipboard = StyleSheet.create({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const CopyTextToClipboard = forwardRef<TouchableOpacity, CopyTextToClipboardProps>(({ text, truncated }, ref) => {
|
const CopyTextToClipboard = forwardRef<React.ElementRef<typeof TouchableOpacity>, CopyTextToClipboardProps>(({ text, truncated }, ref) => {
|
||||||
const [hasTappedText, setHasTappedText] = useState(false);
|
const [hasTappedText, setHasTappedText] = useState(false);
|
||||||
const [address, setAddress] = useState(text);
|
const [address, setAddress] = useState(text);
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ type SecondButtonProps = {
|
||||||
testID?: string;
|
testID?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const SecondButton = forwardRef<TouchableOpacity, SecondButtonProps>((props, ref) => {
|
export const SecondButton = forwardRef<React.ElementRef<typeof TouchableOpacity>, SecondButtonProps>((props, ref) => {
|
||||||
const { colors } = useTheme();
|
const { colors } = useTheme();
|
||||||
let backgroundColor = props.backgroundColor ? props.backgroundColor : colors.buttonGrayBackgroundColor;
|
let backgroundColor = props.backgroundColor ? props.backgroundColor : colors.buttonGrayBackgroundColor;
|
||||||
let fontColor = colors.secondButtonTextColor;
|
let fontColor = colors.secondButtonTextColor;
|
||||||
|
|
|
@ -10,7 +10,7 @@ interface SquareButtonProps {
|
||||||
testID?: string;
|
testID?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const SquareButton = forwardRef<TouchableOpacity, SquareButtonProps>((props, ref) => {
|
export const SquareButton = forwardRef<React.ElementRef<typeof TouchableOpacity>, SquareButtonProps>((props, ref) => {
|
||||||
const { title, onPress, style, testID } = props;
|
const { title, onPress, style, testID } = props;
|
||||||
const { colors } = useTheme();
|
const { colors } = useTheme();
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import React, { useCallback, useEffect, useReducer, useRef } from 'react';
|
import React, { useCallback, useEffect, useReducer, useRef } from 'react';
|
||||||
import { Alert, Platform, ScrollView, StyleSheet, Text, TouchableOpacity, TouchableWithoutFeedback, View } from 'react-native';
|
import { Alert, Platform, ScrollView, StyleSheet, Text, TouchableWithoutFeedback, View } from 'react-native';
|
||||||
import { BlueCard, BlueSpacing20, BlueText } from '../../BlueComponents';
|
import { BlueCard, BlueSpacing20, BlueText } from '../../BlueComponents';
|
||||||
import presentAlert from '../../components/Alert';
|
import presentAlert from '../../components/Alert';
|
||||||
import ListItem from '../../components/ListItem';
|
import ListItem, { TouchableOpacityWrapper } from '../../components/ListItem';
|
||||||
import { useTheme } from '../../components/themes';
|
import { useTheme } from '../../components/themes';
|
||||||
import { unlockWithBiometrics, useBiometrics } from '../../hooks/useBiometrics';
|
import { unlockWithBiometrics, useBiometrics } from '../../hooks/useBiometrics';
|
||||||
import loc from '../../loc';
|
import loc from '../../loc';
|
||||||
|
@ -195,7 +195,7 @@ const EncryptStorage = () => {
|
||||||
title={loc.settings.plausible_deniability}
|
title={loc.settings.plausible_deniability}
|
||||||
chevron
|
chevron
|
||||||
testID="PlausibleDeniabilityButton"
|
testID="PlausibleDeniabilityButton"
|
||||||
Component={TouchableOpacity}
|
Component={TouchableOpacityWrapper}
|
||||||
containerStyle={[styles.row, styleHooks.root]}
|
containerStyle={[styles.row, styleHooks.root]}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Add table
Reference in a new issue