diff --git a/releases/next/css/react-native.css b/releases/next/css/react-native.css index fe765b09d39..e2601c66d8c 100644 --- a/releases/next/css/react-native.css +++ b/releases/next/css/react-native.css @@ -1793,3 +1793,22 @@ article li { .btn:hover { text-decoration: none !important; } + +.video-container { + border-radius: 4px; + background-clip: padding-box; + margin: 0 0 18px; + height: 180px; + width: 100%; + background-size: cover; + background-position: center center; + position: relative; + height: 0; + overflow: hidden; +} + +@media (min-width: 760px) { + .video-container { + height: 345px; + } +} diff --git a/releases/next/docs/cameraroll.html b/releases/next/docs/cameraroll.html index a5bc716fa51..e0b867d22d5 100644 --- a/releases/next/docs/cameraroll.html +++ b/releases/next/docs/cameraroll.html @@ -19,25 +19,26 @@ const { TouchableOpacity } = ReactNative; +const invariant = require('invariant'); + const CameraRollView = require('./CameraRollView'); const AssetScaledImageExampleView = require('./AssetScaledImageExample'); -const CAMERA_ROLL_VIEW = 'camera_roll_view'; - class CameraRollExample extends React.Component { state = { groupTypes: 'SavedPhotos', sliderValue: 1, bigImages: true, }; - + _cameraRollView: ?CameraRollView; render() { return ( <View> <Switch onValueChange={this._onSwitchChange} - value={this.state.bigImages} /> + value={this.state.bigImages} + /> <Text>{(this.state.bigImages ? 'Big' : 'Small') + ' Images'}</Text> <Slider value={this.state.sliderValue} @@ -45,7 +46,7 @@ class CameraRollExample extends /> <Text>{'Group Type: ' + this.state.groupTypes}</Text> <CameraRollView - ref={CAMERA_ROLL_VIEW} + ref={(ref) => { this._cameraRollView = ref; }} batchSize={20} groupTypes={this.state.groupTypes} renderImage={this._renderImage} @@ -68,8 +69,8 @@ class CameraRollExample extends = (asset) => { const imageSize = this.state.bigImages ? 150 : 75; const imageStyle = [styles.image, {width: imageSize, height: imageSize}]; - const location = asset.node.location.longitude ? - JSON.stringify(asset.node.location) : 'Unknown location'; + const {location} = asset.node; + const locationStr = location ? JSON.stringify(location) : 'Unknown location'; return ( <TouchableOpacity key={asset} onPress={ this.loadAsset.bind( this, asset ) }> <View style={styles.row}> @@ -79,7 +80,7 @@ class CameraRollExample extends /> <View style={styles.info}> <Text style={styles.url}>{asset.node.image.uri}</Text> - <Text>{location}</Text> + <Text>{locationStr}</Text> <Text>{asset.node.group_name}</Text> <Text>{new Date(asset.node.timestamp).toString()}</Text> </View> @@ -98,7 +99,8 @@ class CameraRollExample extends }; _onSwitchChange = (value) => { - this.refs[CAMERA_ROLL_VIEW].rendererChanged(); + invariant(this._cameraRollView, 'ref should be set'); + this._cameraRollView.rendererChanged(); this.setState({ bigImages: value }); }; } diff --git a/releases/next/docs/modal.html b/releases/next/docs/modal.html index 6e72412a4e0..fa8bd190103 100644 --- a/releases/next/docs/modal.html +++ b/releases/next/docs/modal.html @@ -45,18 +45,23 @@ class ModalExample extends /View> ); } -}
DeprecatedUse the animationType prop instead.
The animationType prop controls how the modal animates.
slide slides in from the bottomfade fades into viewnone appears without an animationThe onRequestClose prop allows passing a function that will be called once the modal has been dismissed.
On the Android platform, this is a required function.
The onShow prop allows passing a function that will be called once the modal has been shown.
The transparent prop determines whether your modal will fill the entire view. Setting this to true will render the modal over a transparent background.
The visible prop determines whether your modal is visible.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |
DeprecatedUse the animationType prop instead.
The animationType prop controls how the modal animates.
slide slides in from the bottomfade fades into viewnone appears without an animationThe onRequestClose prop allows passing a function that will be called once the modal has been dismissed.
On the Android platform, this is a required function.
The onShow prop allows passing a function that will be called once the modal has been shown.
The transparent prop determines whether your modal will fill the entire view. Setting this to true will render the modal over a transparent background.
The visible prop determines whether your modal is visible.
The onOrientationChange callback is called when the orientation changes while the modal is being displayed.
+The orientation provided is only 'portrait' or 'landscape'. This callback is also called on initial render, regardless of the current orientation.
The supportedOrientations prop allows the modal to be rotated to any of the specified orientations.
+On iOS, the modal is still restricted by what's specified in your app's Info.plist's UISupportedInterfaceOrientations field.
You can edit the content above on GitHub and send us a pull request!
Examples # | Edit on GitHub |