Documentation fixes

This commit is contained in:
Nicolas Gallagher
2015-09-03 23:12:17 -07:00
parent 17d993261b
commit b5c8af2694
7 changed files with 34 additions and 102 deletions
+8 -9
View File
@@ -2,12 +2,10 @@
#### PropTypes
All other props are transferred directly to the `element`.
All other props are transferred to the resulting `img`.
+ `accessibilityLabel`: `string`
+ `async`: `bool` (TODO)
+ `className`: `string`
+ `source`: `string`
+ `source`: `object`
+ `style`: `ImageStylePropTypes`
#### ImageStylePropTypes
@@ -20,10 +18,11 @@ All other props are transferred directly to the `element`.
#### Examples
```js
import {Image} from 'react-web-sdk';
import React, {PropTypes} from 'react';
import React, { Image } from 'react-native-web'
class Avatar extends React.Component {
const { Component, PropTypes } = React;
class Avatar extends Component {
static propTypes = {
size: PropTypes.oneOf(['small', 'normal', 'large']),
user: PropTypes.object
@@ -37,10 +36,10 @@ class Avatar extends React.Component {
return (
<Image
accessibilityLabel={`${user.name}'s profile picture`}
source={user.avatarUrl}
source={{ uri: user.avatarUrl }}
style={ ...style.base, ...style[this.props.size] }
/>
);
)
}
}
+6 -5
View File
@@ -4,9 +4,9 @@ Text layout and styles.
#### PropTypes
All other props are transferred directly to the `element`.
All other props are transferred directly to the `component`.
+ `element`: `func` or `string` (default `"div"`)
+ `component`: `func` or `string` (default `'div'`)
+ `style`: `TextStylePropTypes`
#### TextStylePropTypes
@@ -17,10 +17,11 @@ All other props are transferred directly to the `element`.
## Examples
```js
import {Text} from 'react-web-sdk';
import React, {PropTypes} from 'react';
import React, { Text } from 'react-native-web'
class PrettyText extends React.Component {
const { Component, PropTypes } = React
class PrettyText extends Component {
static propTypes = {
color: PropTypes.oneOf(['white', 'gray', 'red']),
size: PropTypes.oneOf(['small', 'normal', 'large']),
+1 -1
View File
@@ -4,7 +4,7 @@ Text input layout and styles.
#### PropTypes
All other props are transferred directly to the `element`.
All other props are transferred directly to the `component`.
+ `component`: `func` or `string` (default `"div"`)
+ `style`: `TextStylePropTypes`
+3 -3
View File
@@ -8,7 +8,7 @@ any type.
All other props are transferred directly to the `element`.
+ `element`: `func` or `string` (default `"div"`)
+ `component`: `func` or `string` (default `'div'`)
+ `pointerEvents`: `oneOf('all', 'box-only', 'box-none', 'none')`
+ `style`: `ViewStylePropTypes`
@@ -21,7 +21,7 @@ All other props are transferred directly to the `element`.
+ `color`: `string`
+ `opacity`: `number`
## ViewStyleDefaultProps
## ViewDefaultStyle
Implements the default styles from
[facebook/css-layout](https://github.com/facebook/css-layout).
@@ -43,7 +43,7 @@ Implements the default styles from
`right`, `bottom` do something when not specifying `position:absolute`.
```js
const ViewStyleDefaultProps = {
const ViewDefaultStyle = {
alignItems: 'stretch', // 1
borderWidth: 0,
borderStyle: 'solid',