UNPKG

@prosperitainova/dumbo-react-native

Version:
67 lines 2.24 kB
import React from 'react'; import { TextStyle, ViewStyle } from 'react-native'; import { BaseTextInputTypes, TextInputProps } from '../../types/shared'; /** Props for the internal base text input */ type BaseTextInputProps = { /** Type of text input to render */ type: BaseTextInputTypes; /** Callback for needed info for full bleed styling. If set full bleed styling is used. */ fullBleedCallback?: (focus: boolean, error: boolean) => void; }; /** * Get the base styling for text inputs * * @param light - Indicate that light variant should be used * @param hasLabelLink - Indicates that item has label with link * @param fullBleed - Indicates that it should be full bleed style * * @returns React style item */ export declare const getTextInputStyle: (light?: boolean, hasLabelLink?: boolean, fullBleed?: boolean) => { wrapper: ViewStyle; labelWrapper: ViewStyle; label: TextStyle; helperText: TextStyle; errorText: TextStyle; warningText: TextStyle; textBox: TextStyle; textBoxDisabled: TextStyle; textBoxActive: TextStyle; textBoxError: TextStyle; textBoxWrapper: ViewStyle; passwordRevealButton: ViewStyle; dateIcon: ViewStyle; errorIcon: ViewStyle; numberActions: ViewStyle; numberActionsDivider: ViewStyle; numberActionsButton: ViewStyle; labelLink: ViewStyle; }; /** * @ignore * This is the base system for text input. * This allows a shared code base for all text input systems and validation rules * This component is not exported. It is used by `TextInput`, `TextArea` and `PasswordInput`. */ export declare class BaseTextInput extends React.Component<BaseTextInputProps & TextInputProps> { state: { dirty: boolean; hasFocus: boolean; revealPassword: boolean; }; private get styles(); private onFocus; private onBlur; private onChange; private get passwordReveal(); private get dateIcon(); private get baseErrorWarningStyle(); private get errorIndicator(); private get warningIndicator(); private incrementNumber; private decrementNumber; private get numberActions(); render(): React.ReactNode; } export {}; //# sourceMappingURL=index.d.ts.map