From 63fc2acec20b85664347ff795674f4157ea92aca Mon Sep 17 00:00:00 2001 From: Travis CI Date: Mon, 25 Jan 2016 18:18:08 +0000 Subject: [PATCH] update website --- css/react-native.css | 5 +++++ docs/image.html | 11 ++++++++++- docs/scrollview.html | 11 +++++++---- docs/text.html | 4 +++- docs/textinput.html | 8 ++++---- docs/view.html | 11 +++++++---- docs/webview.html | 4 ++-- 7 files changed, 38 insertions(+), 16 deletions(-) diff --git a/css/react-native.css b/css/react-native.css index a08f351d6bd..05e541bb9d8 100644 --- a/css/react-native.css +++ b/css/react-native.css @@ -1041,6 +1041,11 @@ div[data-twttr-id] iframe { margin-top: 0; } +.compactProps .propTitle div { + font-weight: normal; + margin-left: 20px; +} + .prop { padding: 5px 10px; } diff --git a/docs/image.html b/docs/image.html index 8eb52d11b05..afb735faab7 100644 --- a/docs/image.html +++ b/docs/image.html @@ -22,7 +22,16 @@ so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding).

'stretch': Scale width and height independently, This may change the aspect ratio of the src.

source {uri: string}, number #

uri is a string representing the resource identifier for the image, which could be an http address, a local file path, or the name of a static image -resource (which should be wrapped in the require('./path/to/image.png') function).

style style #

resizeMode Object.keys(ImageResizeMode)
backfaceVisibility enum('visible', 'hidden')
backgroundColor ColorPropType
borderColor ColorPropType
borderWidth number
borderRadius number
overflow enum('visible', 'hidden')
tintColor ColorPropType
opacity number
overlayColor string

testID string #

A unique identifier for this element to be used in UI Automation +resource (which should be wrapped in the require('./path/to/image.png') function).

style style #

backfaceVisibility enum('visible', 'hidden')
backgroundColor ColorPropType
borderColor ColorPropType
borderRadius number
borderWidth number
opacity number
overflow enum('visible', 'hidden')
resizeMode Object.keys(ImageResizeMode)
androidoverlayColor string

When the image has rounded corners, specifying an overlayColor will +cause the remaining space in the corners to be filled with a solid color. +This is useful in cases which are not supported by the Android +implementation of rounded corners: + - Certain resize modes, such as 'contain' + - Animated GIFs

A typical way to use this prop is with images displayed on a solid +background and setting the overlayColor to the same color +as the background.

For details of how this works under the hood, see +http://frescolib.org/docs/rounded-corners-and-circles.html

iostintColor ColorPropType

iOS-Specific style to "tint" an image. +Changes the color of all the non-transparent pixels to the tintColor.

testID string #

A unique identifier for this element to be used in UI Automation testing scripts.

iosaccessibilityLabel string #

The text that's read by the screen reader when the user interacts with the image.

iosaccessible bool #

When true, indicates the image is an accessibility element.

ioscapInsets {top: number, left: number, bottom: number, right: number} #

When the image is resized, the corners of the size specified by capInsets will stay a fixed size, but the center content and borders diff --git a/docs/scrollview.html b/docs/scrollview.html index a1c18897de1..93df351c88b 100644 --- a/docs/scrollview.html +++ b/docs/scrollview.html @@ -32,7 +32,12 @@ events can be controlled using the scrollEventThrottle prop.

See RefreshControl.

removeClippedSubviews bool #

Experimental: When true, offscreen child views (whose overflow value is hidden) are removed from their native backing superview when offscreen. This can improve scrolling performance on long lists. The default value is -true.

showsHorizontalScrollIndicator bool #

When true, shows a horizontal scroll indicator.

showsVerticalScrollIndicator bool #

When true, shows a vertical scroll indicator.

style style #

backfaceVisibility enum('visible', 'hidden')
backgroundColor ColorPropType
borderColor ColorPropType
borderTopColor ColorPropType
borderRightColor ColorPropType
borderBottomColor ColorPropType
borderLeftColor ColorPropType
borderRadius number
borderTopLeftRadius number
borderTopRightRadius number
borderBottomLeftRadius number
borderBottomRightRadius number
borderStyle enum('solid', 'dotted', 'dashed')
borderWidth number
borderTopWidth number
borderRightWidth number
borderBottomWidth number
borderLeftWidth number
opacity number
overflow enum('visible', 'hidden')
elevation number

iosalwaysBounceHorizontal bool #

When true, the scroll view bounces horizontally when it reaches the end +true.

showsHorizontalScrollIndicator bool #

When true, shows a horizontal scroll indicator.

showsVerticalScrollIndicator bool #

When true, shows a vertical scroll indicator.

style style #

backfaceVisibility enum('visible', 'hidden')
backgroundColor ColorPropType
borderBottomColor ColorPropType
borderBottomLeftRadius number
borderBottomRightRadius number
borderBottomWidth number
borderColor ColorPropType
borderLeftColor ColorPropType
borderLeftWidth number
borderRadius number
borderRightColor ColorPropType
borderRightWidth number
borderStyle enum('solid', 'dotted', 'dashed')
borderTopColor ColorPropType
borderTopLeftRadius number
borderTopRightRadius number
borderTopWidth number
borderWidth number
opacity number
overflow enum('visible', 'hidden')
androidelevation number

(Android-only) Sets the elevation of a view, using Android's underlying +elevation API. +This adds a drop shadow to the item and affects z-order for overlapping views. +Only supported on Android 5.0+, has no effect on earlier versions.

androidsendMomentumEvents bool #

When true, momentum events will be sent from Android +This is internal and set automatically by the framework if you have +onMomentumScrollBegin or onMomentumScrollEnd set on your ScrollView

iosalwaysBounceHorizontal bool #

When true, the scroll view bounces horizontally when it reaches the end even if the content is smaller than the scroll view itself. The default value is true when horizontal={true} and false otherwise.

iosalwaysBounceVertical bool #

When true, the scroll view bounces vertically when it reaches the end even if the content is smaller than the scroll view itself. The default @@ -64,9 +69,7 @@ The default value is zero, which means the scroll event will be sent only once each time the view is scrolled.

iosscrollIndicatorInsets {top: number, left: number, bottom: number, right: number} #

The amount by which the scroll view indicators are inset from the edges of the scroll view. This should normally be set to the same value as the contentInset. Defaults to {0, 0, 0, 0}.

iosscrollsToTop bool #

When true, the scroll view scrolls to top when the status bar is tapped. -The default value is true.

androidsendMomentumEvents bool #

When true, momentum events will be sent from Android -This is internal and set automatically by the framework if you have -onMomentumScrollBegin or onMomentumScrollEnd set on your ScrollView

iossnapToAlignment enum('start', "center", 'end') #

When snapToInterval is set, snapToAlignment will define the relationship +The default value is true.

iossnapToAlignment enum('start', "center", 'end') #

When snapToInterval is set, snapToAlignment will define the relationship of the the snapping to the scroll view. - start (the default) will align the snap at the left (horizontal) or top (vertical) - center will align the snap in the center diff --git a/docs/text.html b/docs/text.html index e0c7ac8434a..76201285122 100644 --- a/docs/text.html +++ b/docs/text.html @@ -25,7 +25,9 @@ each other on account of the literal newlines:

}, };

Edit on GitHubProps #

accessible #

numberOfLines number #

Used to truncate the text with an ellipsis after computing the text layout, including line wrapping, such that the total number of lines -does not exceed this number.

onLayout function #

Invoked on mount and layout changes with

{nativeEvent: {layout: {x, y, width, height}}}

onPress function #

This function is called on press.

style style #

color ColorPropType
fontFamily string
fontSize number
fontStyle enum('normal', 'italic')
fontWeight enum("normal", 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900')
textShadowOffset {width: number, height: number}
textShadowRadius number
textShadowColor ColorPropType
letterSpacing number
lineHeight number
textAlign enum("auto", 'left', 'right', 'center', 'justify')
textAlignVertical enum("auto", 'top', 'bottom', 'center')
textDecorationLine enum("none", 'underline', 'line-through', 'underline line-through')
textDecorationStyle enum("solid", 'double', 'dotted', 'dashed')
textDecorationColor ColorPropType
writingDirection enum("auto", 'ltr', 'rtl')

testID string #

Used to locate this view in end-to-end tests.

iosallowFontScaling bool #

Specifies should fonts scale to respect Text Size accessibility setting on iOS.

iossuppressHighlighting bool #

When true, no visual change is made when text is pressed down. By +does not exceed this number.

onLayout function #

Invoked on mount and layout changes with

{nativeEvent: {layout: {x, y, width, height}}}

onPress function #

This function is called on press.

style style #

color ColorPropType
fontFamily string
fontSize number
fontStyle enum('normal', 'italic')
fontWeight enum("normal", 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900')

Specifies font weight. The values 'normal' and 'bold' are supported for +most fonts. Not all fonts have a variant for each of the numeric values, +in that case the closest one is chosen.

lineHeight number
textAlign enum("auto", 'left', 'right', 'center', 'justify')

Specifies text alignment. The value 'justify' is only supported on iOS.

textShadowColor ColorPropType
textShadowOffset {width: number, height: number}
textShadowRadius number
androidtextAlignVertical enum("auto", 'top', 'bottom', 'center')
iosletterSpacing number
iostextDecorationColor ColorPropType
iostextDecorationLine enum("none", 'underline', 'line-through', 'underline line-through')
iostextDecorationStyle enum("solid", 'double', 'dotted', 'dashed')
ioswritingDirection enum("auto", 'ltr', 'rtl')

testID string #

Used to locate this view in end-to-end tests.

iosallowFontScaling bool #

Specifies should fonts scale to respect Text Size accessibility setting on iOS.

iossuppressHighlighting bool #

When true, no visual change is made when text is pressed down. By default, a gray oval highlights the text on press down.

Edit on GitHubDescription #

Nested Text #

In iOS, the way to display formatted text is by using NSAttributedString: you give the text that you want to display and annotate ranges with some specific formatting. In practice, this is very tedious. For React Native, we decided to use web paradigm for this where you can nest text to achieve the same effect.

<Text style={{fontWeight: 'bold'}}> I am bold <Text style={{color: 'red'}}> diff --git a/docs/textinput.html b/docs/textinput.html index e8031d08f4b..3799bd635e6 100644 --- a/docs/textinput.html +++ b/docs/textinput.html @@ -25,16 +25,16 @@ value prop if provided. For most uses this works great, but in some cases this may cause flickering - one common cause is preventing edits by keeping value the same. In addition to simply setting the same value, either set editable={false}, or set/update maxLength to prevent -unwanted edits without flicker.

iosblurOnSubmit bool #

If true, the text field will blur when submitted. +unwanted edits without flicker.

androidnumberOfLines number #

Sets the number of lines for a TextInput. Use it with multiline set to +true to be able to fill the lines.

androidunderlineColorAndroid string #

The color of the textInput underline.

iosblurOnSubmit bool #

If true, the text field will blur when submitted. The default value is true for single-line fields and false for multiline fields. Note that for multiline fields, setting blurOnSubmit to true means that pressing return will blur the field and trigger the onSubmitEditing event instead of inserting a newline into the field.

iosclearButtonMode enum('never', 'while-editing', 'unless-editing', 'always') #

When the clear button should appear on the right side of the text view

iosclearTextOnFocus bool #

If true, clears the text field automatically when editing begins

iosenablesReturnKeyAutomatically bool #

If true, the keyboard disables the return key when there is no text and -automatically enables it when there is text. The default value is false.

ioskeyboardAppearance enum('default', 'light', 'dark') #

Determines the color of the keyboard.

androidnumberOfLines number #

Sets the number of lines for a TextInput. Use it with multiline set to -true to be able to fill the lines.

iosonKeyPress function #

Callback that is called when a key is pressed. +automatically enables it when there is text. The default value is false.

ioskeyboardAppearance enum('default', 'light', 'dark') #

Determines the color of the keyboard.

iosonKeyPress function #

Callback that is called when a key is pressed. Pressed key value is passed as an argument to the callback handler. Fires before onChange callbacks.

iosreturnKeyType enum('default', 'go', 'google', 'join', 'next', 'route', 'search', 'send', 'yahoo', 'done', 'emergency-call') #

Determines how the return key should look.

iosselectTextOnFocus bool #

If true, all text will automatically be selected on focus

iosselectionState DocumentSelectionState #

See DocumentSelectionState.js, some state that is responsible for -maintaining selection information for a document

androidunderlineColorAndroid string #

The color of the textInput underline.

Next →

WebView

Renders a native WebView.

Edit on GitHubProps #

automaticallyAdjustContentInsets bool #

contentInset {top: number, left: number, bottom: number, right: number} #

html string #

injectedJavaScript string #

Sets the JS to be injected when the webpage loads.

onError function #

Invoked when load fails

onLoad function #

Invoked when load finish

onLoadEnd function #

Invoked when load either succeeds or fails

onLoadStart function #

Invoked on load start

onNavigationStateChange function #

renderError function #

Function that returns a view to show if there's an error.

renderLoading function #

Function that returns a loading indicator.

startInLoadingState bool #

url string #

iosallowsInlineMediaPlayback bool #

Determines whether HTML5 videos play inline or use the native full-screen +WebView – React Native | A framework for building native apps using React

WebView

Renders a native WebView.

Edit on GitHubProps #

automaticallyAdjustContentInsets bool #

contentInset {top: number, left: number, bottom: number, right: number} #

html string #

injectedJavaScript string #

Sets the JS to be injected when the webpage loads.

onError function #

Invoked when load fails

onLoad function #

Invoked when load finish

onLoadEnd function #

Invoked when load either succeeds or fails

onLoadStart function #

Invoked on load start

onNavigationStateChange function #

renderError function #

Function that returns a view to show if there's an error.

renderLoading function #

Function that returns a loading indicator.

startInLoadingState bool #

url string #

androiddomStorageEnabled bool #

Used on Android only, controls whether DOM Storage is enabled or not

androidjavaScriptEnabled bool #

Used on Android only, JS is enabled by default for WebView on iOS

iosallowsInlineMediaPlayback bool #

Determines whether HTML5 videos play inline or use the native full-screen controller. default value false NOTE : "In order for video to play inline, not only does this property need to be set to true, but the video element in the HTML -document must also include the webkit-playsinline attribute."

iosbounces bool #

androiddomStorageEnabled bool #

Used on Android only, controls whether DOM Storage is enabled or not

androidjavaScriptEnabled bool #

Used on Android only, JS is enabled by default for WebView on iOS

iosonShouldStartLoadWithRequest function #

Allows custom handling of any webview requests by a JS handler. Return true +document must also include the webkit-playsinline attribute."

iosbounces bool #

iosonShouldStartLoadWithRequest function #

Allows custom handling of any webview requests by a JS handler. Return true or false from this method to continue loading the request.

iosscalesPageToFit bool #

Sets whether the webpage scales to fit the view and the user can change the scale.

iosscrollEnabled bool #

Edit on GitHubExamples #

'use strict'; var React = require('react-native');