mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #31466 from viventus/master
[react-native] Add nativeID on ViewProps
This commit is contained in:
Vendored
+10
@@ -912,6 +912,11 @@ export interface TextProps extends TextPropsIOS, TextPropsAndroid, Accessibility
|
||||
* Used to locate this view in end-to-end tests.
|
||||
*/
|
||||
testID?: string;
|
||||
|
||||
/**
|
||||
* Used to reference react managed views from native code.
|
||||
*/
|
||||
nativeID?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2031,6 +2036,11 @@ export interface ViewProps
|
||||
* Used to locate this view in end-to-end tests.
|
||||
*/
|
||||
testID?: string;
|
||||
|
||||
/**
|
||||
* Used to reference react managed views from native code.
|
||||
*/
|
||||
nativeID?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -832,3 +832,12 @@ const SwitchColorTest = () => (
|
||||
const SwitchThumbColorTest = () => (
|
||||
<Switch thumbColor={'red'} />
|
||||
)
|
||||
|
||||
const NativeIDTest = () => (
|
||||
<ScrollView nativeID={'nativeID'}>
|
||||
<View nativeID={'nativeID'} />
|
||||
<Text nativeID={'nativeID'} >
|
||||
Text
|
||||
</Text>
|
||||
</ScrollView>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user