import * as React from "react"; import { StyleProp, TextStyle } from "react-native"; import AnimatedText from "../Text/AnimatedText"; import type { $Omit } from "../types"; import { DefaultTheme } from "styled-components"; declare type Props = $Omit<$Omit, "padding">, "type"> & { /** * Type of the helper text. */ type: "error" | "info"; /** * Whether to display the helper text. */ visible?: boolean; /** * Whether to apply padding to the helper text. */ padding?: "none" | "normal"; /** * Text content of the HelperText. */ children: React.ReactNode; style?: StyleProp; /** * @optional */ theme?: DefaultTheme; /** * TestID used for testing purposes */ testID?: string; }; /** * Helper text is used in conjuction with input elements to provide additional hints for the user. * *
* *
* * ## Usage * ```js * import * as React from 'react'; * import { View } from 'react-native'; * import HelperText from 'react-native-simple-elements/components/HelperText'; * import TextInput from "react-native-simple-elements/components/TextInput"; * * const MyComponent = () => { * const [text, setText] = React.useState(''); * * const onChangeText = text => setText(text); * * const hasErrors = () => { * return !text.includes('@'); * }; * * return ( * * * * Email address is invalid! * * * ); * }; * * export default MyComponent; * ``` */ declare const HelperText: ({ style, type, visible, onLayout, padding, ...rest }: Props) => JSX.Element; export default HelperText;