diff --git a/components/HDPath.tsx b/components/HDPath.tsx index 244b765..582d890 100644 --- a/components/HDPath.tsx +++ b/components/HDPath.tsx @@ -1,9 +1,10 @@ import React, { useState } from 'react'; -import { ScrollView, View, Text, StyleSheet } from 'react-native'; +import { ScrollView, View, Text } from 'react-native'; import { Button, TextInput } from 'react-native-paper'; import { addAccountFromHDPath } from '../utils/Accounts'; import { Account, PathState } from '../types'; +import styles from '../styles/stylesheet'; const HDPath = ({ pathCode, @@ -26,7 +27,7 @@ const HDPath = ({ const handleChange = (key: keyof PathState, value: string) => { setPath({ ...path, - [key]: value.replace(/[^0-9]/g, ''), // Allow only numeric characters + [key]: value.replace(/[^0-9]/g, ''), }); }; @@ -50,37 +51,34 @@ const HDPath = ({ }; return ( - - - {pathCode} + + + {pathCode} handleChange('firstNumber', text)} value={path.firstNumber} - style={styles.textInput} - maxLength={1} + style={styles.HDtextInput} /> - '/ + '/ handleChange('secondNumber', text)} value={path.secondNumber} - style={styles.textInput} - maxLength={1} + style={styles.HDtextInput} /> - / + / handleChange('thirdNumber', text)} value={path.thirdNumber} - style={styles.textInput} - maxLength={1} + style={styles.HDtextInput} /> - +