@ha_tecno/react-native-sdk
Version:
React Native SDK for biometric authentication, liveness detection, and fingerprint recognition
50 lines (49 loc) • 1.13 kB
JavaScript
;
import { Dimensions, StyleSheet, View } from 'react-native';
import Rectangle from '../../assets/svg/gabarito.svg';
import { Finger } from "../../utils/finger.js";
import { jsx as _jsx } from "react/jsx-runtime";
const getPositionStyle = finger => {
const {
height
} = Dimensions.get('window');
const [position, fingerType] = [finger.substring(0, 1), finger.substring(1, 2)];
if (fingerType === 'T') {
return {
top: height / 3,
transform: [{
rotate: '90deg'
}]
};
}
if (position === 'L') {
return {
right: 20,
transform: [{
rotate: '180deg'
}]
};
}
return {
left: 20
};
};
export const Gabarito = ({
finger = Finger.RIGHT_INDEX
}) => {
const positionStyle = getPositionStyle(finger);
return /*#__PURE__*/_jsx(View, {
style: [styles.container, positionStyle],
children: /*#__PURE__*/_jsx(Rectangle, {
height: 250
})
});
};
const styles = StyleSheet.create({
container: {
position: 'absolute',
alignSelf: 'center',
justifyContent: 'center'
}
});
//# sourceMappingURL=Gabarito.js.map