import { TextInput } from 'react-native'; import type { ComponentProps } from 'react'; import type { ThemeType } from '../../literals/Type.literal'; /** * @docunator * @title ZenInputProps * @description Props for the ZenInput component. * @category Themed Components Props * */ type ZenInputProps = { label?: string; dir?: 'ltr' | 'rtl'; leftIcon?: string; rightIcon?: string; leftAccessory?: any; rightAccessory?: any; multiline?: boolean; multilineVariantHeight?: number; disabled?: boolean; type?: ThemeType; }; /** * @docunator * @title ZenInput * @description An input field with a label. The label is optional. * @category Themed Components * @param {string} label The label for the input field * @param {string} dir The direction of the text. Can be 'ltr' or 'rtl'. Default is 'ltr' * @param {string} leftIcon The left icon name * @param {string} rightIcon The right icon name * @param {Element} leftAccessory The left accessory element * @param {Element} rightAccessory The right accessory element * @param {boolean} multiline Whether the input is multiline * @param {number} multilineVariantHeight The height multiplier for multiline inputs. Default is 10 * @param {boolean} disabled Whether the input is disabled * @param {string } type The theme type for the input. Default is 'primary' * @param {Object} props All regular TextInput props * @link https://reactnative.dev/docs/textinput * @author Danilo Ramírez Mattey * @version 1.0.0 * @example {tsx} import { ZenButton, ZenInput } from 'react-zen-ui'; import { useState } from 'react'; import { StyleSheet, View } from 'react-native'; const styles = StyleSheet.create({ buttonsContainer: { display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', marginBottom: 20, marginTop: 10, gap: 10, }, container: { flex: 1, }, box: { width: 60, height: 60, marginVertical: 20, }, }); export default function InputExample(){ const [leftAccessory, setLeftAccessory] = useState(true); const [rightAccessory, setRightAccessory] = useState(true); const [textValue, setTextValue] = useState('Welcome to ZenUI'); const [textareaValue, setTextareaValue] = useState('This is a multiline textarea.'); return ( <> Input setTextValue(t)} value={textValue} autoComplete={'off'} autoCapitalize={'none'} multiline={false} /> setTextareaValue(t)} value={textareaValue} autoComplete={'off'} autoCapitalize={'none'} multiline={true} /> setPasswordValue(t)} value={passwordValue} autoComplete={'off'} placeholder={''} autoCapitalize={'none'} secureTextEntry={true} multiline={false} /> ); } {/tsx} */ export default function ZenInput({ label, dir, leftIcon, rightIcon, leftAccessory, rightAccessory, multiline, multilineVariantHeight, disabled, type, ...props }: ZenInputProps & ComponentProps): import("react/jsx-runtime").JSX.Element; export {}; //# sourceMappingURL=ZenInput.d.ts.map