mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-02 14:38:20 +08:00
fix: add missing static property positions
This commit is contained in:
20
types/react-native-drawer-layout/index.d.ts
vendored
20
types/react-native-drawer-layout/index.d.ts
vendored
@@ -94,12 +94,16 @@ export interface DrawerLayoutProperties extends ViewProperties {
|
||||
}
|
||||
|
||||
export default class DrawerLayout extends React.Component<DrawerLayoutProperties> {
|
||||
/**
|
||||
* Opens the drawer.
|
||||
*/
|
||||
openDrawer(): void;
|
||||
/**
|
||||
* Closes the drawer.
|
||||
*/
|
||||
closeDrawer(): void;
|
||||
static positions: {
|
||||
Left: "left";
|
||||
Right: "right";
|
||||
};
|
||||
/**
|
||||
* Opens the drawer.
|
||||
*/
|
||||
openDrawer(): void;
|
||||
/**
|
||||
* Closes the drawer.
|
||||
*/
|
||||
closeDrawer(): void;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,16 @@ class DrawerTest extends React.Component<{}, DrawerTestState> {
|
||||
>
|
||||
<View>
|
||||
<Text>Screen content</Text>
|
||||
<Text>
|
||||
{
|
||||
DrawerLayout.positions.Left
|
||||
}
|
||||
</Text>
|
||||
<Text>
|
||||
{
|
||||
DrawerLayout.positions.Right
|
||||
}
|
||||
</Text>
|
||||
</View>
|
||||
</DrawerLayout>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user