feat: Sprint 0 — project scaffold, DB schema, Zustand stores, base UI components
This commit is contained in:
22
components/ui/Input.tsx
Normal file
22
components/ui/Input.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import { View, Text, TextInput, TextInputProps } from 'react-native';
|
||||
|
||||
interface InputProps extends TextInputProps {
|
||||
label?: string;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
export function Input({ label, error, ...props }: InputProps) {
|
||||
return (
|
||||
<View className="mb-4">
|
||||
{label && <Text className="text-charcoal font-medium mb-1">{label}</Text>}
|
||||
<TextInput
|
||||
className={`border rounded-xl px-4 py-3 text-charcoal bg-white ${
|
||||
error ? 'border-danger' : 'border-gray-200'
|
||||
}`}
|
||||
placeholderTextColor="#9CA3AF"
|
||||
{...props}
|
||||
/>
|
||||
{error && <Text className="text-danger text-sm mt-1">{error}</Text>}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user