-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fullscreen image with mode changing and prev/next callbacks
- Loading branch information
Showing
7 changed files
with
106 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"presets": ["react-native"] | ||
} | ||
"presets": ["react-native", "react-native-stage-0/decorator-support"] | ||
} |
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,8 @@ | ||
|
||
const LANDSCAPE = 'LANDSCAPE', | ||
PORTRAIT = 'PORTRAIT' | ||
|
||
export { | ||
LANDSCAPE, | ||
PORTRAIT | ||
} |
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,22 @@ | ||
|
||
|
||
import { observable, action } from 'mobx'; | ||
import { PORTRAIT } from './Constants'; | ||
|
||
class Store { | ||
@observable orientation = PORTRAIT; | ||
|
||
@action changeOrientation(orientation) { | ||
this.orientation = orientation; | ||
} | ||
|
||
@action prevImage() { | ||
console.log('previous'); | ||
} | ||
|
||
@action nextImage() { | ||
console.log('next'); | ||
} | ||
} | ||
|
||
export default new Store(); |
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
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 |
---|---|---|
@@ -1,22 +1,26 @@ | ||
{ | ||
"name": "ImgurApp", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"start": "node node_modules/react-native/local-cli/cli.js start", | ||
"test": "jest" | ||
}, | ||
"dependencies": { | ||
"react": "15.4.2", | ||
"react-native": "0.41.2" | ||
}, | ||
"devDependencies": { | ||
"babel-jest": "18.0.0", | ||
"babel-preset-react-native": "1.9.1", | ||
"jest": "18.1.0", | ||
"react-test-renderer": "15.4.2" | ||
}, | ||
"jest": { | ||
"preset": "react-native" | ||
} | ||
} | ||
"name": "ImgurApp", | ||
"version": "0.0.1", | ||
"private": true, | ||
"scripts": { | ||
"start": "node node_modules/react-native/local-cli/cli.js start", | ||
"test": "jest" | ||
}, | ||
"dependencies": { | ||
"babel-preset-react-native-stage-0": "^1.0.1", | ||
"mobx": "^3.1.0", | ||
"mobx-react": "^4.1.0", | ||
"react": "15.4.2", | ||
"react-native": "0.41.2", | ||
"react-native-orientation": "^1.17.0" | ||
}, | ||
"devDependencies": { | ||
"babel-jest": "18.0.0", | ||
"babel-preset-react-native": "1.9.1", | ||
"jest": "18.1.0", | ||
"react-test-renderer": "15.4.2" | ||
}, | ||
"jest": { | ||
"preset": "react-native" | ||
} | ||
} |