feat: amountField
This commit is contained in:
parent
0ea9acde38
commit
93d16fc08a
6 changed files with 134 additions and 17 deletions
|
|
@ -1,10 +1,26 @@
|
|||
import { View, Text } from 'react-native'
|
||||
import React from 'react'
|
||||
import { View, Text, StyleSheet, TextInput, NativeSyntheticEvent, TextInputKeyPressEventData, TouchableOpacity } from 'react-native'
|
||||
import React, { useRef, useState } from 'react'
|
||||
import { SIZES } from '../../../constants/theme'
|
||||
import { useTheme } from '../../contexts/ThemeContext'
|
||||
import { AutoDecimalInput } from '../../../components'
|
||||
|
||||
export default function addItem() {
|
||||
export default function AddItem() {
|
||||
const value = useRef<string>("");
|
||||
const [formatedValue, setFormatedValue] = useState<string>("");
|
||||
|
||||
const handleValueChange = (formatedValue: string) => {
|
||||
setFormatedValue(formatedValue);
|
||||
}
|
||||
console.log(formatedValue)
|
||||
return (
|
||||
<View>
|
||||
<Text>addItem</Text>
|
||||
<View style={styles.container}>
|
||||
<AutoDecimalInput onValueChange={handleValueChange} label='Amount'></AutoDecimalInput>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
margin: SIZES.normal,
|
||||
}
|
||||
})
|
||||
Reference in a new issue