Skip to content

Instantly share code, notes, and snippets.

@dabbott
Created December 5, 2016 19:14
Show Gist options
  • Save dabbott/15de307f2bce75be5ec0d33ad46ef4bb to your computer and use it in GitHub Desktop.
Save dabbott/15de307f2bce75be5ec0d33ad46ef4bb to your computer and use it in GitHub Desktop.
http://cdn.rawgit.com/dabbott/react-native-web-player/gh-v1.6.1/index.html#width=260&scale=0.75&fullscreen=true&styles=%7B%22tab%22%3A%7B%22backgroundColor%22%3A%22rgb(250%2C250%2C250)%22%7D%2C%22header%22%3A%7B%22backgroundColor%22%3A%22rgb(250%2C250%2C250)%22%2C%22boxShadow%22%3A%22rgba(0%2C%200%2C%200%2C%200.2)%200px%201px%201px%22%2C%22zIndex%22%3A10%7D%2C%22headerText%22%3A%7B%22color%22%3A%22%23AAA%22%2C%22fontWeight%22%3A%22normal%22%7D%2C%22transpilerHeader%22%3A%7B%22backgroundColor%22%3A%22rgb(240%2C240%2C240)%22%2C%22boxShadow%22%3A%22rgba(0%2C%200%2C%200%2C%200.2)%200px%201px%201px%22%2C%22zIndex%22%3A10%7D%2C%22transpilerHeaderText%22%3A%7B%22color%22%3A%22%23888%22%2C%22fontWeight%22%3A%22normal%22%7D%2C%22tabText%22%3A%7B%22color%22%3A%22%23AAA%22%7D%2C%22tabTextActive%22%3A%7B%22color%22%3A%22%23000%22%7D%7D&title=Shoutem%20Animation&code=import%20React%2C%20%7B%20Component%20%7D%20from%20'react'%0Aimport%20%7B%20AppRegistry%2C%20StyleSheet%2C%20View%2C%20Text%2C%20Easing%20%7D%20from%20'react-native'%0Aimport%20%7B%20TimingDriver%2C%20FadeIn%20%7D%20from%20'%40shoutem%2Fanimation'%0A%0Aclass%20App%20extends%20React.Component%20%7B%0A%20%20%0A%20%20driver%20%3D%20new%20TimingDriver(%7B%0A%20%20%20%20duration%3A%201000%2C%20%20%20%20%2F%2F%20default%3A%20250%0A%20%20%20%20easing%3A%20Easing.in%2C%20%2F%2F%20default%3A%20Easing.cubic%0A%20%20%20%20delay%3A%20200%2C%20%20%20%20%20%20%20%20%2F%2F%20default%3A%200%0A%20%20%7D)%0A%20%20%0A%20%20animateForward%20%3D%20()%20%3D%3E%20this.driver.runTimer(1%2C%20this.animateBackward)%0A%20%20%0A%20%20animateBackward%20%3D%20()%20%3D%3E%20this.driver.runTimer(0%2C%20this.animateForward)%0A%20%20%0A%20%20componentDidMount()%20%7B%0A%20%20%20%20this.animateForward()%0A%20%20%7D%0A%20%20%0A%20%20render()%20%7B%20%20%20%20%0A%20%20%20%20return%20(%0A%20%20%20%20%20%20%3CFadeIn%20driver%3D%7Bthis.driver%7D%3E%0A%20%20%20%20%20%20%20%20%3CView%20style%3D%7Bstyles.container%7D%3E%0A%20%20%20%20%20%20%20%20%20%20%3CText%20style%3D%7Bstyles.text%7D%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20Shoutem%20Animation%0A%20%20%20%20%20%20%20%20%20%20%3C%2FText%3E%0A%20%20%20%20%20%20%20%20%3C%2FView%3E%0A%20%20%20%20%20%20%3C%2FFadeIn%3E%0A%20%20%20%20)%0A%20%20%7D%0A%7D%0A%0Aconst%20styles%20%3D%20StyleSheet.create(%7B%0A%20%20container%3A%20%7B%0A%20%20%20%20height%3A%20100%2C%0A%20%20%20%20backgroundColor%3A%20'skyblue'%2C%0A%20%20%20%20justifyContent%3A%20'center'%2C%0A%20%20%20%20alignItems%3A%20'center'%2C%0A%20%20%7D%2C%0A%20%20text%3A%20%7B%0A%20%20%20%20fontSize%3A%2024%2C%0A%20%20%20%20color%3A%20'steelblue'%2C%0A%20%20%7D%2C%0A%7D)%0A%0AAppRegistry.registerComponent('App'%2C%20()%20%3D%3E%20App)%0A&vendorComponents=%5B%5B%22%40shoutem%2Fanimation%22%2C%22https%3A%2F%2Fgist.githubusercontent.com%2Fdabbott%2F8c18bd0582c1a67b8187afc165007abb%2Fraw%2F21dcbd1bad9c33af126a26c72b417fbadd0df82a%2F%40shoutem-animation.js%22%5D%5D&panes=%5B%22editor%22%2C%22player%22%5D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment