UNPKG

1.67 kBTypeScriptView Raw
1import React from 'react';
2import type { LayoutChangeEvent, TextStyle, StyleProp, Animated } from 'react-native';
3import type { AdornmentConfig, AdornmentStyleAdjustmentForNativeInput } from './types';
4import { AdornmentSide, AdornmentType } from './enums';
5export declare function getAdornmentConfig({ left, right, }: {
6 left?: React.ReactNode;
7 right?: React.ReactNode;
8}): Array<AdornmentConfig>;
9export declare function getAdornmentStyleAdjustmentForNativeInput({ adornmentConfig, leftAffixWidth, rightAffixWidth, paddingHorizontal, inputOffset, mode, }: {
10 inputOffset?: number;
11 adornmentConfig: AdornmentConfig[];
12 leftAffixWidth: number;
13 rightAffixWidth: number;
14 mode?: 'outlined' | 'flat';
15 paddingHorizontal?: number | string;
16}): AdornmentStyleAdjustmentForNativeInput | {};
17export interface TextInputAdornmentProps {
18 forceFocus: () => void;
19 adornmentConfig: AdornmentConfig[];
20 topPosition: {
21 [AdornmentType.Affix]: {
22 [AdornmentSide.Left]: number | null;
23 [AdornmentSide.Right]: number | null;
24 };
25 [AdornmentType.Icon]: number;
26 };
27 onAffixChange: {
28 [AdornmentSide.Left]: (event: LayoutChangeEvent) => void;
29 [AdornmentSide.Right]: (event: LayoutChangeEvent) => void;
30 };
31 left?: React.ReactNode;
32 right?: React.ReactNode;
33 textStyle?: StyleProp<TextStyle>;
34 visible?: Animated.Value;
35 isTextInputFocused: boolean;
36 paddingHorizontal?: number | string;
37 maxFontSizeMultiplier?: number | undefined | null;
38}
39declare const TextInputAdornment: React.FunctionComponent<TextInputAdornmentProps>;
40export default TextInputAdornment;