mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-28 12:15:37 +08:00
Codemod to 1.7.0
Differential Revision: D5763302 fbshipit-source-id: a91ca1786c7ac8eb9aa3dd43555a7a223dc6f9cf
This commit is contained in:
committed by
Facebook Github Bot
parent
888c6e7eac
commit
70c6700be8
@@ -48,16 +48,12 @@ class CameraRollExample extends React.Component<
|
||||
onValueChange={this._onSwitchChange}
|
||||
value={this.state.bigImages}
|
||||
/>
|
||||
<Text>
|
||||
{(this.state.bigImages ? 'Big' : 'Small') + ' Images'}
|
||||
</Text>
|
||||
<Text>{(this.state.bigImages ? 'Big' : 'Small') + ' Images'}</Text>
|
||||
<Slider
|
||||
value={this.state.sliderValue}
|
||||
onValueChange={this._onSliderChange}
|
||||
/>
|
||||
<Text>
|
||||
{'Group Type: ' + this.state.groupTypes}
|
||||
</Text>
|
||||
<Text>{'Group Type: ' + this.state.groupTypes}</Text>
|
||||
<CameraRollView
|
||||
ref={ref => {
|
||||
this._cameraRollView = ref;
|
||||
@@ -93,18 +89,10 @@ class CameraRollExample extends React.Component<
|
||||
<View style={styles.row}>
|
||||
<Image source={asset.node.image} style={imageStyle} />
|
||||
<View style={styles.info}>
|
||||
<Text style={styles.url}>
|
||||
{asset.node.image.uri}
|
||||
</Text>
|
||||
<Text>
|
||||
{locationStr}
|
||||
</Text>
|
||||
<Text>
|
||||
{asset.node.group_name}
|
||||
</Text>
|
||||
<Text>
|
||||
{new Date(asset.node.timestamp).toString()}
|
||||
</Text>
|
||||
<Text style={styles.url}>{asset.node.image.uri}</Text>
|
||||
<Text>{locationStr}</Text>
|
||||
<Text>{asset.node.group_name}</Text>
|
||||
<Text>{new Date(asset.node.timestamp).toString()}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
|
||||
@@ -70,9 +70,7 @@ class EventCheckBoxExample extends React.Component<{}, $FlowFixMeState> {
|
||||
style={{marginBottom: 10}}
|
||||
value={this.state.eventCheckBoxIsOn}
|
||||
/>
|
||||
<Text>
|
||||
{this.state.eventCheckBoxIsOn ? 'On' : 'Off'}
|
||||
</Text>
|
||||
<Text>{this.state.eventCheckBoxIsOn ? 'On' : 'Off'}</Text>
|
||||
</View>
|
||||
<View>
|
||||
<CheckBox
|
||||
@@ -87,9 +85,7 @@ class EventCheckBoxExample extends React.Component<{}, $FlowFixMeState> {
|
||||
style={{marginBottom: 10}}
|
||||
value={this.state.eventCheckBoxRegressionIsOn}
|
||||
/>
|
||||
<Text>
|
||||
{this.state.eventCheckBoxRegressionIsOn ? 'On' : 'Off'}
|
||||
</Text>
|
||||
<Text>{this.state.eventCheckBoxRegressionIsOn ? 'On' : 'Off'}</Text>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
|
||||
@@ -38,16 +38,10 @@ const WS_STATES = [
|
||||
|
||||
class Button extends React.Component {
|
||||
render(): React.Element<any> {
|
||||
const label = (
|
||||
<Text style={styles.buttonLabel}>
|
||||
{this.props.label}
|
||||
</Text>
|
||||
);
|
||||
const label = <Text style={styles.buttonLabel}>{this.props.label}</Text>;
|
||||
if (this.props.disabled) {
|
||||
return (
|
||||
<View style={[styles.button, styles.disabledButton]}>
|
||||
{label}
|
||||
</View>
|
||||
<View style={[styles.button, styles.disabledButton]}>{label}</View>
|
||||
);
|
||||
}
|
||||
return (
|
||||
@@ -62,14 +56,8 @@ class Row extends React.Component {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<View style={styles.row}>
|
||||
<Text>
|
||||
{this.props.label}
|
||||
</Text>
|
||||
{this.props.value
|
||||
? <Text>
|
||||
{this.props.value}
|
||||
</Text>
|
||||
: null}
|
||||
<Text>{this.props.label}</Text>
|
||||
{this.props.value ? <Text>{this.props.value}</Text> : null}
|
||||
{this.props.children}
|
||||
</View>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user