fix: add missing static property positions

This commit is contained in:
bang
2018-02-03 17:15:46 +08:00
parent 8058968995
commit 78c32c0c0b
2 changed files with 22 additions and 8 deletions

View File

@@ -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;
}

View File

@@ -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>
);