forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.ts
More file actions
19 lines (15 loc) · 847 Bytes
/
index.ts
File metadata and controls
19 lines (15 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import type {Component} from 'react';
import type {AnimatedRef} from 'react-native-reanimated';
import {setNativeProps} from 'react-native-reanimated';
import type {AccessibilityRoleForm, NewPasswordAutocompleteType, PasswordAutocompleteType} from './types';
/**
* Web password field needs `current-password` as autocomplete type which is not supported on native
*/
const PASSWORD_AUTOCOMPLETE_TYPE: PasswordAutocompleteType = 'current-password';
const NEW_PASSWORD_AUTOCOMPLETE_TYPE: NewPasswordAutocompleteType = 'new-password';
const ACCESSIBILITY_ROLE_FORM: AccessibilityRoleForm = 'form';
function forceClearInput(animatedInputRef: AnimatedRef<Component>) {
'worklet';
setNativeProps(animatedInputRef, {text: ''});
}
export {PASSWORD_AUTOCOMPLETE_TYPE, ACCESSIBILITY_ROLE_FORM, NEW_PASSWORD_AUTOCOMPLETE_TYPE, forceClearInput};