-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #406 from Froelund/master
Added DrawerExample
- Loading branch information
Showing
6 changed files
with
61 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React,{ | ||
Component | ||
} from 'react-native' | ||
import Launch from './Launch' | ||
import Drawer from 'react-native-drawer' | ||
import {DefaultRenderer} from 'react-native-router-flux'; | ||
|
||
export default class Navigation extends Component { | ||
render(){ | ||
console.log(this.context); | ||
const navigationState = this.props.navigationState; | ||
let selected = navigationState.children[navigationState.index]; | ||
// var activeScene = (selected.name == "root" : selected[0] ? selected); | ||
return ( | ||
<Drawer | ||
ref="navigation" | ||
type="displace" | ||
content={<Launch />} | ||
tapToClose={true} | ||
openDrawerOffset={0.2} | ||
panCloseMask={0.2} | ||
negotiatePan={true} | ||
tweenHandler={(ratio) => ({ | ||
main: { opacity:Math.max(0.54,1-ratio) } | ||
})}> | ||
<DefaultRenderer navigationState={selected} key={selected.key} {...selected} /> | ||
</Drawer> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.