import React from 'react' import { StyleProp, StyleSheet, TextInput as RNTextInput, TextStyle, } from 'react-native' import {usePalette} from '../../../lib/hooks/usePalette' import {addStyle} from '../../../lib/addStyle' export type TextInputRef = RNTextInput interface TextInputProps { testID: string innerRef: React.Ref placeholder: string style: StyleProp onChangeText: (str: string) => void onPaste: (err: string | undefined, uris: string[]) => void } export function TextInput({ testID, innerRef, placeholder, style, onChangeText, children, }: React.PropsWithChildren) { const pal = usePalette('default') style = addStyle(style, styles.input) return ( onChangeText(str)} placeholder={placeholder} placeholderTextColor={pal.colors.textLight} style={style}> {children} ) } const styles = StyleSheet.create({ input: { minHeight: 140, }, })