Skip to content

Commit 4749490

Browse files
author
Xiaosong Gao
committed
Move orientation support to default props.
1 parent d02f7af commit 4749490

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ This is the outter navigator for all modes. You can change these properties of `
101101
| choosePhotoTitle | string | ChoosePhoto page title |
102102
| maxSizeChooseAlert | (num: number) => string | Max size limit alert message when choosing photos |
103103
| maxSizeTakeAlert | (num: number) => string | Max size limit alert message when taking photos from camera |
104+
| supportedOrientations | string[] | Supported orientations. Default is landscape and portrait |
104105

105106
### CameraView
106107

src/PhotoModalPage.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default class extends React.PureComponent {
1818
choosePhotoTitle: 'Choose Photo',
1919
maxSizeChooseAlert: (number) => 'You can only choose ' + number + ' photos at most',
2020
maxSizeTakeAlert: (number) => 'You can only take ' + number + ' photos at most',
21+
supportedOrientations: ['portrait', 'landscape'],
2122
};
2223

2324
componentDidMount() {
@@ -74,7 +75,7 @@ export default class extends React.PureComponent {
7475
return (
7576
<Modal
7677
animationType={'slide'}
77-
supportedOrientations={['portrait', 'landscape']}
78+
supportedOrientations={this.props.supportedOrientations}
7879
>
7980
<NavigationDoor />
8081
</Modal>

0 commit comments

Comments
 (0)