-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathDeviceAuthenticationButton.tsx
More file actions
38 lines (34 loc) · 963 Bytes
/
DeviceAuthenticationButton.tsx
File metadata and controls
38 lines (34 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import React from 'react';
import { TouchableOpacity, TouchableOpacityProps } from 'react-native';
import styles from './styles';
import Icon, {
IconName,
IconSize,
IconColor,
} from '../../../component-library/components/Icons/Icon';
import { LoginViewSelectors } from '../../Views/Login/LoginView.testIds';
type DeviceAuthenticationButtonProps = {
hidden: boolean;
} & TouchableOpacityProps;
const DeviceAuthenticationButton = ({
hidden,
...props
}: DeviceAuthenticationButtonProps) => {
if (hidden) return null;
return (
<TouchableOpacity
testID={LoginViewSelectors.BIOMETRY_BUTTON}
hitSlop={styles.hitSlop}
{...props}
>
<Icon
color={IconColor.Default}
style={styles.fixCenterIcon}
size={IconSize.Lg}
name={IconName.SecurityKey}
testID={LoginViewSelectors.DEVICE_AUTHENTICATION_ICON}
/>
</TouchableOpacity>
);
};
export default DeviceAuthenticationButton;