managarten/apps-archived/presi/apps/mobile/components/atoms/Input.tsx
Till-JS 44897ae758 chore: archive inventory, presi, storage apps
Move these apps to apps-archived/ as they are not actively developed:
- inventory: Inventory management app
- presi: Presentation tool
- storage: Cloud storage app

These can be reactivated by moving back to apps/ when needed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 15:22:38 +01:00

59 lines
1.1 KiB
TypeScript

import { TextInput, View, Text, StyleSheet } from 'react-native';
interface InputProps {
value: string;
onChangeText: (text: string) => void;
placeholder?: string;
secureTextEntry?: boolean;
label?: string;
error?: string;
}
export const Input = ({
value,
onChangeText,
placeholder,
secureTextEntry = false,
label,
error,
}: InputProps) => {
return (
<View style={styles.container}>
{label && <Text style={styles.label}>{label}</Text>}
<TextInput
value={value}
onChangeText={onChangeText}
placeholder={placeholder}
secureTextEntry={secureTextEntry}
style={[styles.input, error && styles.inputError]}
/>
{error && <Text style={styles.error}>{error}</Text>}
</View>
);
};
const styles = StyleSheet.create({
container: {
marginBottom: 16,
},
label: {
fontSize: 16,
marginBottom: 8,
color: '#000',
},
input: {
borderWidth: 1,
borderColor: '#ccc',
borderRadius: 8,
padding: 12,
fontSize: 16,
},
inputError: {
borderColor: '#ff0000',
},
error: {
color: '#ff0000',
fontSize: 14,
marginTop: 4,
},
});