This repository has been archived on 2026-04-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
interaktive-systeme/app/(tabs)/home/addItem.tsx
2024-01-05 00:37:06 +01:00

26 lines
No EOL
848 B
TypeScript

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() {
const value = useRef<string>("");
const [formatedValue, setFormatedValue] = useState<string>("");
const handleValueChange = (formatedValue: string) => {
setFormatedValue(formatedValue);
}
console.log(formatedValue)
return (
<View style={styles.container}>
<AutoDecimalInput onValueChange={handleValueChange} label='Amount'></AutoDecimalInput>
</View>
)
}
const styles = StyleSheet.create({
container: {
margin: SIZES.normal,
}
})