Changeset View
Changeset View
Standalone View
Standalone View
native/components/clearable-text-input.js
// @flow | // @flow | ||||
import * as React from 'react'; | import * as React from 'react'; | ||||
import { TextInput as BaseTextInput } from 'react-native'; | import { TextInput as BaseTextInput } from 'react-native'; | ||||
type TextInputProps = React.ElementConfig<typeof BaseTextInput>; | type TextInputProps = React.ElementConfig<typeof BaseTextInput>; | ||||
export type ClearableTextInputProps = { | export type ClearableTextInputProps = { | ||||
...TextInputProps, | ...TextInputProps, | ||||
textInputRef: (textInput: ?React.ElementRef<typeof BaseTextInput>) => mixed, | +textInputRef: (textInput: ?React.ElementRef<typeof BaseTextInput>) => mixed, | ||||
onChangeText: $NonMaybeType<$PropertyType<TextInputProps, 'onChangeText'>>, | +onChangeText: $NonMaybeType<$PropertyType<TextInputProps, 'onChangeText'>>, | ||||
value: $NonMaybeType<$PropertyType<TextInputProps, 'value'>>, | +value: $NonMaybeType<$PropertyType<TextInputProps, 'value'>>, | ||||
}; | }; |