mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-18 06:49:40 +02:00
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>
59 lines
1.1 KiB
TypeScript
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,
|
|
},
|
|
});
|