mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 04:49:15 +08:00
Merge pull request #19522 from huhuanming/react-natvie-maskview
Add MaskedView
This commit is contained in:
15
types/react-native/index.d.ts
vendored
15
types/react-native/index.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
// Type definitions for react-native 0.47
|
||||
// Type definitions for react-native 0.48
|
||||
// Project: https://github.com/facebook/react-native
|
||||
// Definitions by: Eloy Durán <https://github.com/alloy>
|
||||
// Fedor Nezhivoi <https://github.com/gyzerok>
|
||||
@@ -4328,6 +4328,16 @@ export interface MapViewStatic extends NativeMethodsMixin, React.ComponentClass<
|
||||
}
|
||||
}
|
||||
|
||||
interface MaskedViewProperties extends ViewProperties {
|
||||
maskElement: React.ReactElement<any>,
|
||||
}
|
||||
|
||||
/**
|
||||
* @see https://facebook.github.io/react-native/docs/maskedviewios.html
|
||||
*/
|
||||
export interface MaskedViewStatic extends NativeMethodsMixin, React.ComponentClass<MaskedViewProperties> {
|
||||
}
|
||||
|
||||
export interface ModalProperties {
|
||||
|
||||
// Only `animated` is documented. The JS code says `animated` is
|
||||
@@ -8893,6 +8903,9 @@ export type ListView = ListViewStatic
|
||||
export var MapView: MapViewStatic
|
||||
export type MapView = MapViewStatic
|
||||
|
||||
export var MaskedView: MaskedViewStatic
|
||||
export type MaskedView = MaskedViewStatic
|
||||
|
||||
export var Modal: ModalStatic
|
||||
export type Modal = ModalStatic
|
||||
|
||||
|
||||
@@ -39,7 +39,8 @@ import {
|
||||
ScrollViewProps,
|
||||
RefreshControl,
|
||||
TabBarIOS,
|
||||
NativeModules
|
||||
NativeModules,
|
||||
MaskedView,
|
||||
} from 'react-native';
|
||||
|
||||
declare module 'react-native' {
|
||||
@@ -354,3 +355,17 @@ class AlertTest extends React.Component {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MaskedViewTest extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<MaskedView
|
||||
maskElement={
|
||||
<View />
|
||||
}
|
||||
>
|
||||
<View />
|
||||
</MaskedView>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user