mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Add example on Components
Summary: <!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes. Help us understand your motivation by explaining why you decided to make this change. You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html Happy contributing! --> Adding example on components section with [react-native-web-player](https://github.com/dabbott/react-native-web-player) - ActivityIndicator - TouchableOpacity - TouchableHighlight Screenshot on http://localhost:8079/react-native/docs/activityindicator.html  Screenshot on http://localhost:8079/react-native/docs/touchableopacity.html  Screenshot on http://localhost:8079/react-native/docs/touchablehighlight.html  Closes https://github.com/facebook/react-native/pull/15950 Differential Revision: D5881366 Pulled By: hramos fbshipit-source-id: 2926071723defedf9ed5cb1b1128204256c71dd9
This commit is contained in:
committed by
Facebook Github Bot
parent
a389ffbd84
commit
f7f347329e
@@ -36,6 +36,46 @@ type DefaultProps = {
|
||||
|
||||
/**
|
||||
* Displays a circular loading indicator.
|
||||
*
|
||||
* ### Example
|
||||
*
|
||||
* ```ReactNativeWebPlayer
|
||||
* import React, { Component } from 'react'
|
||||
* import {
|
||||
* ActivityIndicator,
|
||||
* AppRegistry,
|
||||
* StyleSheet,
|
||||
* Text,
|
||||
* View,
|
||||
* } from 'react-native'
|
||||
*
|
||||
* class App extends Component {
|
||||
* render() {
|
||||
* return (
|
||||
* <View style={[styles.container, styles.horizontal]}>
|
||||
* <ActivityIndicator size="large" color="#0000ff" />
|
||||
* <ActivityIndicator size="small" color="#00ff00" />
|
||||
* <ActivityIndicator size="large" color="#0000ff" />
|
||||
* <ActivityIndicator size="small" color="#00ff00" />
|
||||
* </View>
|
||||
* )
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* const styles = StyleSheet.create({
|
||||
* container: {
|
||||
* flex: 1,
|
||||
* justifyContent: 'center'
|
||||
* },
|
||||
* horizontal: {
|
||||
* flexDirection: 'row',
|
||||
* justifyContent: 'space-around',
|
||||
* padding: 10
|
||||
* }
|
||||
* })
|
||||
*
|
||||
* AppRegistry.registerComponent('App', () => App)
|
||||
* ```
|
||||
*/
|
||||
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
|
||||
* suppresses an error when upgrading Flow's support for React. To see the
|
||||
|
||||
Reference in New Issue
Block a user