import {BarCodeScanner} from 'expo-barcode-scanner'; import React, {ReactElement, useState} from 'react'; import {Text, View} from 'react-native'; import {Button, DefaultTheme, HelperText, Subheading, TextInput, Title} from 'react-native-paper'; import {ButtonProps, ScannerProps} from '../models/ElementProps'; import {colors, styles} from './Styles'; export const Scanner = (props: ScannerProps): ReactElement => { return Instruct the patient to hold their card up with the barcode facing the camera. Keep the barcode in the orange box. ; }; export const ScanButton = (props: ButtonProps): ReactElement => { return ; }; export const InputIdButton = (props: ButtonProps): ReactElement => { return ; }; export const IdNumberInput = (props: ScannerProps): ReactElement => { const [inputStr, setInputStr] = useState(''); const pattern = /^[\d]{9}$/; const hasErrors = () => { return !pattern.test(inputStr); }; const onSubmit = () => { props.onScanned({type: '', data: inputStr}); } return Manual ID # Entry Please double check that you have entered the number correctly. Entering an incorrect ID number will prevent patients from receiving their test results. setInputStr(inputStr)} mode="outlined" theme={DefaultTheme} keyboardType="numeric" /> ID number must be exactly 9 digits. No other characters are allowed. ; };