Reverted commit D4027388
Reviewed By: yungsters Differential Revision: D4027388 fbshipit-source-id: 8e3341b6f393ccf432c1a4e22a7cbf422284a06f
This commit is contained in:
parent
dbfd046145
commit
6ea26c01de
|
@ -68,6 +68,6 @@ exports.description = 'Interface to show iOS\' accessibility samples';
|
|||
exports.examples = [
|
||||
{
|
||||
title: 'Accessibility elements',
|
||||
render(): React.Element<*> { return <AccessibilityIOSExample />; }
|
||||
render(): React.Element<any> { return <AccessibilityIOSExample />; }
|
||||
},
|
||||
];
|
||||
|
|
|
@ -197,27 +197,27 @@ exports.description = 'Interface to show iOS\' action sheets';
|
|||
exports.examples = [
|
||||
{
|
||||
title: 'Show Action Sheet',
|
||||
render(): React.Element<*> { return <ActionSheetExample />; }
|
||||
render(): React.Element<any> { return <ActionSheetExample />; }
|
||||
},
|
||||
{
|
||||
title: 'Show Action Sheet with tinted buttons',
|
||||
render(): React.Element<*> { return <ActionSheetTintExample />; }
|
||||
render(): React.Element<any> { return <ActionSheetTintExample />; }
|
||||
},
|
||||
{
|
||||
title: 'Show Share Action Sheet',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return <ShareActionSheetExample url="https://code.facebook.com" />;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Share Local Image',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return <ShareActionSheetExample url="bunny.png" />;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Share Screenshot',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return <ShareScreenshotExample />;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ exports.description = 'Example of using the ad support API.';
|
|||
exports.examples = [
|
||||
{
|
||||
title: 'Ad Support IOS',
|
||||
render: function(): React.Element<*> {
|
||||
render: function(): React.Element<any> {
|
||||
return <AdSupportIOSExample />;
|
||||
},
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ exports.examples = [{
|
|||
},
|
||||
{
|
||||
title: 'Prompt Options',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return <PromptOptions />;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -89,7 +89,7 @@ class Circle extends React.Component {
|
|||
});
|
||||
}
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
if (this.state.panResponder) {
|
||||
var handlers = this.state.panResponder.panHandlers;
|
||||
var dragStyle = { // Used to position while dragging
|
||||
|
@ -190,7 +190,7 @@ class AnExApp extends React.Component {
|
|||
this._onMove = this._onMove.bind(this);
|
||||
}
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
var circles = this.state.keys.map((key, idx) => {
|
||||
if (key === this.state.activeKey) {
|
||||
return <Circle key={key + 'd'} dummy={true} />;
|
||||
|
|
|
@ -96,7 +96,7 @@ class AnExBobble extends React.Component {
|
|||
});
|
||||
}
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<View style={styles.bobbleContainer}>
|
||||
{this.state.bobbles.map((_, i) => {
|
||||
|
|
|
@ -52,7 +52,7 @@ class AnExSet extends React.Component {
|
|||
openColor: randColor(),
|
||||
};
|
||||
}
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
var backgroundColor = this.props.openVal ?
|
||||
this.props.openVal.interpolate({
|
||||
inputRange: [0, 1],
|
||||
|
|
|
@ -97,7 +97,7 @@ class AnExTilt extends React.Component {
|
|||
this._startBurnsZoom();
|
||||
}
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<Animated.View
|
||||
{...this.state.tiltPanResponder.panHandlers}
|
||||
|
|
|
@ -95,16 +95,16 @@ exports.examples = [
|
|||
{
|
||||
title: 'Subscribed AppState:',
|
||||
description: 'This changes according to the current state, so you can only ever see it rendered as "active"',
|
||||
render(): React.Element<*> { return <AppStateSubscription showCurrentOnly={true} />; }
|
||||
render(): React.Element<any> { return <AppStateSubscription showCurrentOnly={true} />; }
|
||||
},
|
||||
{
|
||||
title: 'Previous states:',
|
||||
render(): React.Element<*> { return <AppStateSubscription showCurrentOnly={false} />; }
|
||||
render(): React.Element<any> { return <AppStateSubscription showCurrentOnly={false} />; }
|
||||
},
|
||||
{
|
||||
platform: 'ios',
|
||||
title: 'Memory Warnings',
|
||||
description: 'In the IOS simulator, hit Shift+Command+M to simulate a memory warning.',
|
||||
render(): React.Element<*> { return <AppStateSubscription showMemoryWarnings={true} />; }
|
||||
render(): React.Element<any> { return <AppStateSubscription showMemoryWarnings={true} />; }
|
||||
},
|
||||
];
|
||||
|
|
|
@ -120,6 +120,6 @@ exports.description = 'Asynchronous local disk storage.';
|
|||
exports.examples = [
|
||||
{
|
||||
title: 'Basics - getItem, setItem, removeItem',
|
||||
render(): React.Element<*> { return <BasicStorageExample />; }
|
||||
render(): React.Element<any> { return <BasicStorageExample />; }
|
||||
},
|
||||
];
|
||||
|
|
|
@ -143,6 +143,6 @@ exports.description = 'Example component that uses CameraRoll to list user\'s ph
|
|||
exports.examples = [
|
||||
{
|
||||
title: 'Photos',
|
||||
render(): React.Element<*> { return <CameraRollExample />; }
|
||||
render(): React.Element<any> { return <CameraRollExample />; }
|
||||
}
|
||||
];
|
||||
|
|
|
@ -135,7 +135,7 @@ exports.description = 'Select dates and times using the native UIDatePicker.';
|
|||
exports.examples = [
|
||||
{
|
||||
title: '<DatePickerIOS>',
|
||||
render: function(): React.Element<*> {
|
||||
render: function(): React.Element<any> {
|
||||
return <DatePickerExample />;
|
||||
},
|
||||
}];
|
||||
|
|
|
@ -27,7 +27,7 @@ import type React from 'react';
|
|||
|
||||
export type Example = {
|
||||
title: string,
|
||||
render: () => ?React.Element<*>,
|
||||
render: () => ?React.Element<any>,
|
||||
description?: string,
|
||||
platform?: string,
|
||||
};
|
||||
|
|
|
@ -39,7 +39,7 @@ exports.description = 'Examples of using the Geolocation API.';
|
|||
exports.examples = [
|
||||
{
|
||||
title: 'navigator.geolocation',
|
||||
render: function(): React.Element<*> {
|
||||
render: function(): React.Element<any> {
|
||||
return <GeolocationExample />;
|
||||
},
|
||||
}
|
||||
|
|
|
@ -161,12 +161,12 @@ exports.title = 'Layout Animation';
|
|||
exports.description = 'Layout animation';
|
||||
exports.examples = [{
|
||||
title: 'Add and remove views',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return <AddRemoveExample />;
|
||||
},
|
||||
}, {
|
||||
title: 'Cross fade views',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return <CrossFadeExample />;
|
||||
},
|
||||
}];
|
||||
|
|
|
@ -170,7 +170,7 @@ exports.description = 'Examples that show how Layout events can be used to ' +
|
|||
exports.examples = [
|
||||
{
|
||||
title: 'LayoutEventExample',
|
||||
render: function(): React.Element<*> {
|
||||
render: function(): React.Element<any> {
|
||||
return <LayoutEventExample />;
|
||||
},
|
||||
}];
|
||||
|
|
|
@ -142,7 +142,7 @@ class ListViewPagingExample extends React.Component {
|
|||
};
|
||||
}
|
||||
|
||||
renderRow = (rowData: string, sectionID: string, rowID: string): React.Element<*> => {
|
||||
renderRow = (rowData: string, sectionID: string, rowID: string): React.Element<any> => {
|
||||
return (<Thumb text={rowData}/>);
|
||||
};
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ class Example extends Component {
|
|||
this.state = reducer();
|
||||
}
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<ExampleNavigator
|
||||
navigationState={this.state}
|
||||
|
@ -128,7 +128,7 @@ class ExampleNavigator extends Component {
|
|||
navigate: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<NavigationTransitioner
|
||||
navigationState={this.props.navigationState}
|
||||
|
@ -140,7 +140,7 @@ class ExampleNavigator extends Component {
|
|||
|
||||
_render(
|
||||
transitionProps: NavigationTransitionProps,
|
||||
): Array<React.Element<*>> {
|
||||
): Array<React.Element<any>> {
|
||||
return transitionProps.scenes.map((scene) => {
|
||||
const sceneProps = {
|
||||
...transitionProps,
|
||||
|
@ -152,7 +152,7 @@ class ExampleNavigator extends Component {
|
|||
|
||||
_renderScene(
|
||||
sceneProps: NavigationSceneRendererProps,
|
||||
): React.Element<*> {
|
||||
): React.Element<any> {
|
||||
return (
|
||||
<ExampleScene
|
||||
{...sceneProps}
|
||||
|
@ -181,7 +181,7 @@ class ExampleScene extends Component {
|
|||
navigate: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
const {scene, navigate} = this.props;
|
||||
return (
|
||||
<Animated.View
|
||||
|
|
|
@ -95,7 +95,7 @@ class Example extends Component {
|
|||
this.state = reducer();
|
||||
}
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<View style={styles.example}>
|
||||
<ExampleNavigator
|
||||
|
@ -154,7 +154,7 @@ class ExampleNavigator extends Component {
|
|||
this._renderScene = this._renderScene.bind(this);
|
||||
}
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<NavigationTransitioner
|
||||
navigationState={this.props.navigationState}
|
||||
|
@ -165,7 +165,7 @@ class ExampleNavigator extends Component {
|
|||
|
||||
_render(
|
||||
transitionProps: NavigationTransitionProps,
|
||||
): React.Element<*> {
|
||||
): React.Element<any> {
|
||||
const scenes = transitionProps.scenes.map((scene) => {
|
||||
const sceneProps = {
|
||||
...transitionProps,
|
||||
|
@ -182,7 +182,7 @@ class ExampleNavigator extends Component {
|
|||
|
||||
_renderScene(
|
||||
sceneProps: NavigationSceneRendererProps,
|
||||
): React.Element<*> {
|
||||
): React.Element<any> {
|
||||
return (
|
||||
<ExampleScene
|
||||
{...sceneProps}
|
||||
|
@ -203,7 +203,7 @@ class ExampleScene extends Component {
|
|||
navigate: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
const {scene, navigate} = this.props;
|
||||
|
||||
const panHandlers = NavigationPagerPanResponder.forHorizontal({
|
||||
|
|
|
@ -175,22 +175,22 @@ exports.examples = [
|
|||
{
|
||||
title: 'NetInfo.isConnected',
|
||||
description: 'Asynchronously load and observe connectivity',
|
||||
render(): React.Element<*> { return <IsConnected />; }
|
||||
render(): React.Element<any> { return <IsConnected />; }
|
||||
},
|
||||
{
|
||||
title: 'NetInfo.update',
|
||||
description: 'Asynchronously load and observe connectionInfo',
|
||||
render(): React.Element<*> { return <ConnectionInfoCurrent />; }
|
||||
render(): React.Element<any> { return <ConnectionInfoCurrent />; }
|
||||
},
|
||||
{
|
||||
title: 'NetInfo.updateHistory',
|
||||
description: 'Observed updates to connectionInfo',
|
||||
render(): React.Element<*> { return <ConnectionInfoSubscription />; }
|
||||
render(): React.Element<any> { return <ConnectionInfoSubscription />; }
|
||||
},
|
||||
{
|
||||
platform: 'android',
|
||||
title: 'NetInfo.isConnectionExpensive (Android)',
|
||||
description: 'Asynchronously check isConnectionExpensive',
|
||||
render(): React.Element<*> { return <IsConnectionExpensive />; }
|
||||
render(): React.Element<any> { return <IsConnectionExpensive />; }
|
||||
},
|
||||
];
|
||||
|
|
|
@ -147,13 +147,13 @@ exports.description = 'Render lists of selectable options with UIPickerView.';
|
|||
exports.examples = [
|
||||
{
|
||||
title: '<PickerIOS>',
|
||||
render: function(): React.Element<*> {
|
||||
render: function(): React.Element<any> {
|
||||
return <PickerExample />;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '<PickerIOS> with custom styling',
|
||||
render: function(): React.Element<*> {
|
||||
render: function(): React.Element<any> {
|
||||
return <PickerStyleExample />;
|
||||
},
|
||||
}];
|
||||
|
|
|
@ -193,7 +193,7 @@ exports.description = 'Apple PushNotification and badge value';
|
|||
exports.examples = [
|
||||
{
|
||||
title: 'Badge Number',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<View>
|
||||
<Button
|
||||
|
@ -210,13 +210,13 @@ exports.examples = [
|
|||
},
|
||||
{
|
||||
title: 'Push Notifications',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return <NotificationExample />;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Notifications Permissions',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return <NotificationPermissionExample />;
|
||||
}
|
||||
}];
|
||||
|
|
|
@ -90,7 +90,7 @@ exports.description = 'Examples that show useful methods when embedding React Na
|
|||
exports.examples = [
|
||||
{
|
||||
title: 'Updating app properties in runtime',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<AppPropertiesUpdateExample/>
|
||||
);
|
||||
|
@ -98,7 +98,7 @@ exports.examples = [
|
|||
},
|
||||
{
|
||||
title: 'RCTRootView\'s size flexibility',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<RootViewSizeFlexibilityExample/>
|
||||
);
|
||||
|
|
|
@ -150,26 +150,26 @@ exports.description = 'Native segmented control';
|
|||
exports.examples = [
|
||||
{
|
||||
title: 'Segmented controls can have values',
|
||||
render(): React.Element<*> { return <BasicSegmentedControlExample />; }
|
||||
render(): React.Element<any> { return <BasicSegmentedControlExample />; }
|
||||
},
|
||||
{
|
||||
title: 'Segmented controls can have a pre-selected value',
|
||||
render(): React.Element<*> { return <PreSelectedSegmentedControlExample />; }
|
||||
render(): React.Element<any> { return <PreSelectedSegmentedControlExample />; }
|
||||
},
|
||||
{
|
||||
title: 'Segmented controls can be momentary',
|
||||
render(): React.Element<*> { return <MomentarySegmentedControlExample />; }
|
||||
render(): React.Element<any> { return <MomentarySegmentedControlExample />; }
|
||||
},
|
||||
{
|
||||
title: 'Segmented controls can be disabled',
|
||||
render(): React.Element<*> { return <DisabledSegmentedControlExample />; }
|
||||
render(): React.Element<any> { return <DisabledSegmentedControlExample />; }
|
||||
},
|
||||
{
|
||||
title: 'Custom colors can be provided',
|
||||
render(): React.Element<*> { return <ColorSegmentedControlExample />; }
|
||||
render(): React.Element<any> { return <ColorSegmentedControlExample />; }
|
||||
},
|
||||
{
|
||||
title: 'Change events can be detected',
|
||||
render(): React.Element<*> { return <EventSegmentedControlExample />; }
|
||||
render(): React.Element<any> { return <EventSegmentedControlExample />; }
|
||||
}
|
||||
];
|
||||
|
|
|
@ -95,19 +95,19 @@ exports.description = 'Slider input for numeric values';
|
|||
exports.examples = [
|
||||
{
|
||||
title: 'Default settings',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return <SliderExample />;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Initial value: 0.5',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return <SliderExample value={0.5} />;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'minimumValue: -1, maximumValue: 2',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<SliderExample
|
||||
minimumValue={-1}
|
||||
|
@ -118,13 +118,13 @@ exports.examples = [
|
|||
},
|
||||
{
|
||||
title: 'step: 0.25',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return <SliderExample step={0.25} />;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'onSlidingComplete',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<SlidingCompleteExample />
|
||||
);
|
||||
|
@ -133,7 +133,7 @@ exports.examples = [
|
|||
{
|
||||
title: 'Custom min/max track tint color',
|
||||
platform: 'ios',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<SliderExample
|
||||
minimumTrackTintColor={'red'}
|
||||
|
@ -145,21 +145,21 @@ exports.examples = [
|
|||
{
|
||||
title: 'Custom thumb image',
|
||||
platform: 'ios',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return <SliderExample thumbImage={require('./uie_thumb_big.png')} />;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Custom track image',
|
||||
platform: 'ios',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return <SliderExample trackImage={require('./slider.png')} />;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Custom min/max track image',
|
||||
platform: 'ios',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<SliderExample
|
||||
minimumTrackImage={require('./slider-left.png')}
|
||||
|
|
|
@ -74,6 +74,6 @@ exports.description = 'API to capture images from the screen.';
|
|||
exports.examples = [
|
||||
{
|
||||
title: 'Take screenshot',
|
||||
render(): React.Element<*> { return <ScreenshotExample />; }
|
||||
render(): React.Element<any> { return <ScreenshotExample />; }
|
||||
},
|
||||
];
|
||||
|
|
|
@ -134,26 +134,26 @@ class EventSwitchExample extends React.Component {
|
|||
var examples = [
|
||||
{
|
||||
title: 'Switches can be set to true or false',
|
||||
render(): React.Element<*> { return <BasicSwitchExample />; }
|
||||
render(): React.Element<any> { return <BasicSwitchExample />; }
|
||||
},
|
||||
{
|
||||
title: 'Switches can be disabled',
|
||||
render(): React.Element<*> { return <DisabledSwitchExample />; }
|
||||
render(): React.Element<any> { return <DisabledSwitchExample />; }
|
||||
},
|
||||
{
|
||||
title: 'Change events can be detected',
|
||||
render(): React.Element<*> { return <EventSwitchExample />; }
|
||||
render(): React.Element<any> { return <EventSwitchExample />; }
|
||||
},
|
||||
{
|
||||
title: 'Switches are controlled components',
|
||||
render(): React.Element<*> { return <Switch />; }
|
||||
render(): React.Element<any> { return <Switch />; }
|
||||
}
|
||||
];
|
||||
|
||||
if (Platform.OS === 'ios') {
|
||||
examples.push({
|
||||
title: 'Custom colors can be provided',
|
||||
render(): React.Element<*> { return <ColorSwitchExample />; }
|
||||
render(): React.Element<any> { return <ColorSwitchExample />; }
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -433,7 +433,7 @@ exports.examples = [
|
|||
},
|
||||
}, {
|
||||
title: 'Toggling Attributes',
|
||||
render: function(): React.Element<*> {
|
||||
render: function(): React.Element<any> {
|
||||
return <AttributeToggler />;
|
||||
},
|
||||
}, {
|
||||
|
@ -575,7 +575,7 @@ exports.examples = [
|
|||
},
|
||||
}, {
|
||||
title: 'Dynamic Font Size Adjustment',
|
||||
render: function(): React.Element<*> {
|
||||
render: function(): React.Element<any> {
|
||||
return <AdjustingFontSize />;
|
||||
},
|
||||
}];
|
||||
|
|
|
@ -627,7 +627,7 @@ exports.examples = [
|
|||
},
|
||||
{
|
||||
title: 'Event handling',
|
||||
render: function(): React.Element<*> { return <TextEventsExample />; },
|
||||
render: function(): React.Element<any> { return <TextEventsExample />; },
|
||||
},
|
||||
{
|
||||
title: 'Colored input text',
|
||||
|
@ -725,7 +725,7 @@ exports.examples = [
|
|||
},
|
||||
{
|
||||
title: 'Blur on submit',
|
||||
render: function(): React.Element<*> { return <BlurOnSubmitExample />; },
|
||||
render: function(): React.Element<any> { return <BlurOnSubmitExample />; },
|
||||
},
|
||||
{
|
||||
title: 'Multiline blur on submit',
|
||||
|
|
|
@ -242,7 +242,7 @@ exports.examples = [
|
|||
title: 'this.setInterval(fn, t)',
|
||||
description: 'Execute function fn every t milliseconds until cancelled ' +
|
||||
'or component is unmounted.',
|
||||
render: function(): React.Element<*> {
|
||||
render: function(): React.Element<any> {
|
||||
class IntervalExample extends React.Component {
|
||||
state = {
|
||||
showTimer: true,
|
||||
|
|
|
@ -78,14 +78,14 @@ exports.examples = [
|
|||
},
|
||||
}, {
|
||||
title: '<Text onPress={fn}> with highlight',
|
||||
render: function(): React.Element<*> {
|
||||
render: function(): React.Element<any> {
|
||||
return <TextOnPressBox />;
|
||||
},
|
||||
}, {
|
||||
title: 'Touchable feedback events',
|
||||
description: '<Touchable*> components accept onPress, onPressIn, ' +
|
||||
'onPressOut, and onLongPress as props.',
|
||||
render: function(): React.Element<*> {
|
||||
render: function(): React.Element<any> {
|
||||
return <TouchableFeedbackEvents />;
|
||||
},
|
||||
}, {
|
||||
|
@ -93,13 +93,13 @@ exports.examples = [
|
|||
description: '<Touchable*> components also accept delayPressIn, ' +
|
||||
'delayPressOut, and delayLongPress as props. These props impact the ' +
|
||||
'timing of feedback events.',
|
||||
render: function(): React.Element<*> {
|
||||
render: function(): React.Element<any> {
|
||||
return <TouchableDelayEvents />;
|
||||
},
|
||||
}, {
|
||||
title: '3D Touch / Force Touch',
|
||||
description: 'iPhone 6s and 6s plus support 3D touch, which adds a force property to touches',
|
||||
render: function(): React.Element<*> {
|
||||
render: function(): React.Element<any> {
|
||||
return <ForceTouchExample />;
|
||||
},
|
||||
platform: 'ios',
|
||||
|
@ -107,14 +107,14 @@ exports.examples = [
|
|||
title: 'Touchable Hit Slop',
|
||||
description: '<Touchable*> components accept hitSlop prop which extends the touch area ' +
|
||||
'without changing the view bounds.',
|
||||
render: function(): React.Element<*> {
|
||||
render: function(): React.Element<any> {
|
||||
return <TouchableHitSlop />;
|
||||
},
|
||||
}, {
|
||||
title: 'Disabled Touchable*',
|
||||
description: '<Touchable*> components accept disabled prop which prevents ' +
|
||||
'any interaction with component',
|
||||
render: function(): React.Element<*> {
|
||||
render: function(): React.Element<any> {
|
||||
return <TouchableDisabled />;
|
||||
},
|
||||
}];
|
||||
|
|
|
@ -213,7 +213,7 @@ exports.examples = [
|
|||
{
|
||||
title: 'Perspective',
|
||||
description: 'perspective: 850, rotateX: Animated.timing(0 -> 360)',
|
||||
render(): React.Element<*> { return <Flip />; }
|
||||
render(): React.Element<any> { return <Flip />; }
|
||||
},
|
||||
{
|
||||
title: 'Translate, Rotate, Scale',
|
||||
|
|
|
@ -46,6 +46,6 @@ exports.description = 'Transparent view receiving touch events';
|
|||
exports.examples = [
|
||||
{
|
||||
title: 'TransparentHitTestExample',
|
||||
render(): React.Element<*> { return <TransparentHitTestExample />; }
|
||||
render(): React.Element<any> { return <TransparentHitTestExample />; }
|
||||
}
|
||||
];
|
||||
|
|
|
@ -145,7 +145,7 @@ class UIExplorerApp extends React.Component {
|
|||
);
|
||||
}
|
||||
|
||||
_renderHeader(props: NavigationSceneRendererProps): React.Element<*> {
|
||||
_renderHeader(props: NavigationSceneRendererProps): React.Element<any> {
|
||||
return (
|
||||
<NavigationHeader
|
||||
{...props}
|
||||
|
@ -155,7 +155,7 @@ class UIExplorerApp extends React.Component {
|
|||
);
|
||||
}
|
||||
|
||||
_renderTitleComponent(props: NavigationSceneRendererProps): React.Element<*> {
|
||||
_renderTitleComponent(props: NavigationSceneRendererProps): React.Element<any> {
|
||||
return (
|
||||
<NavigationHeader.Title>
|
||||
{UIExplorerStateTitleMap(props.scene.route)}
|
||||
|
@ -163,7 +163,7 @@ class UIExplorerApp extends React.Component {
|
|||
);
|
||||
}
|
||||
|
||||
_renderScene(props: NavigationSceneRendererProps): ?React.Element<*> {
|
||||
_renderScene(props: NavigationSceneRendererProps): ?React.Element<any> {
|
||||
const state = props.scene.route;
|
||||
if (state.key === 'AppList') {
|
||||
return (
|
||||
|
|
|
@ -51,7 +51,7 @@ class UIExplorerExampleContainer extends React.Component {
|
|||
);
|
||||
}
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
if (!this.props.module.examples) {
|
||||
return <this.props.module />;
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ type Props = {
|
|||
class UIExplorerExampleList extends React.Component {
|
||||
props: Props
|
||||
|
||||
render(): ?React.Element<*> {
|
||||
render(): ?React.Element<any> {
|
||||
const filterText = this.props.persister.state.filter;
|
||||
const filterRegex = new RegExp(String(filterText), 'i');
|
||||
const filter = (example) => filterRegex.test(example.module.title);
|
||||
|
@ -90,7 +90,7 @@ class UIExplorerExampleList extends React.Component {
|
|||
);
|
||||
}
|
||||
|
||||
_renderTitleRow(): ?React.Element<*> {
|
||||
_renderTitleRow(): ?React.Element<any> {
|
||||
if (!this.props.displayTitleRow) {
|
||||
return null;
|
||||
}
|
||||
|
@ -106,7 +106,7 @@ class UIExplorerExampleList extends React.Component {
|
|||
);
|
||||
}
|
||||
|
||||
_renderTextInput(): ?React.Element<*> {
|
||||
_renderTextInput(): ?React.Element<any> {
|
||||
if (this.props.disableSearch) {
|
||||
return null;
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ class UIExplorerExampleList extends React.Component {
|
|||
);
|
||||
}
|
||||
|
||||
_renderSectionHeader(data: any, section: string): ?React.Element<*> {
|
||||
_renderSectionHeader(data: any, section: string): ?React.Element<any> {
|
||||
return (
|
||||
<Text style={styles.sectionHeader}>
|
||||
{section.toUpperCase()}
|
||||
|
@ -137,7 +137,7 @@ class UIExplorerExampleList extends React.Component {
|
|||
);
|
||||
}
|
||||
|
||||
_renderExampleRow(example: {key: string, module: Object}): ?React.Element<*> {
|
||||
_renderExampleRow(example: {key: string, module: Object}): ?React.Element<any> {
|
||||
return this._renderRow(
|
||||
example.module.title,
|
||||
example.module.description,
|
||||
|
@ -146,7 +146,7 @@ class UIExplorerExampleList extends React.Component {
|
|||
);
|
||||
}
|
||||
|
||||
_renderRow(title: string, description: string, key: ?string, handler: ?Function): ?React.Element<*> {
|
||||
_renderRow(title: string, description: string, key: ?string, handler: ?Function): ?React.Element<any> {
|
||||
return (
|
||||
<View key={key || title}>
|
||||
<TouchableHighlight onPress={handler}>
|
||||
|
|
|
@ -50,7 +50,7 @@ const WS_STATES = [
|
|||
];
|
||||
|
||||
class Button extends React.Component {
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
const label = <Text style={styles.buttonLabel}>{this.props.label}</Text>;
|
||||
if (this.props.disabled) {
|
||||
return (
|
||||
|
@ -70,7 +70,7 @@ class Button extends React.Component {
|
|||
}
|
||||
|
||||
class Row extends React.Component {
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<View style={styles.row}>
|
||||
<Text>{this.props.label}</Text>
|
||||
|
@ -169,7 +169,7 @@ class WebSocketExample extends React.Component<any, any, State> {
|
|||
this.setState({outgoingMessage: ''});
|
||||
};
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
const socketState = WS_STATES[this.state.socketState || -1];
|
||||
const canConnect =
|
||||
!this.state.socket ||
|
||||
|
|
|
@ -337,15 +337,15 @@ exports.description = 'Base component to display web content';
|
|||
exports.examples = [
|
||||
{
|
||||
title: 'Simple Browser',
|
||||
render(): React.Element<*> { return <WebViewExample />; }
|
||||
render(): React.Element<any> { return <WebViewExample />; }
|
||||
},
|
||||
{
|
||||
title: 'Scale Page to Fit',
|
||||
render(): React.Element<*> { return <ScaledWebView/>; }
|
||||
render(): React.Element<any> { return <ScaledWebView/>; }
|
||||
},
|
||||
{
|
||||
title: 'Bundled HTML',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<WebView
|
||||
style={{
|
||||
|
@ -360,7 +360,7 @@ exports.examples = [
|
|||
},
|
||||
{
|
||||
title: 'Static HTML',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<WebView
|
||||
style={{
|
||||
|
@ -375,7 +375,7 @@ exports.examples = [
|
|||
},
|
||||
{
|
||||
title: 'POST Test',
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<WebView
|
||||
style={{
|
||||
|
|
|
@ -65,7 +65,7 @@ class PromiseTest extends React.Component {
|
|||
}
|
||||
};
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return <View />;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -149,7 +149,7 @@ const KeyboardAvoidingView = React.createClass({
|
|||
this.subscriptions.forEach((sub) => sub.remove());
|
||||
},
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
const {behavior, children, style, ...props} = this.props;
|
||||
|
||||
switch (behavior) {
|
||||
|
|
|
@ -28,7 +28,7 @@ class StaticRenderer extends React.Component {
|
|||
return nextProps.shouldUpdate;
|
||||
}
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return this.props.render();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -386,7 +386,7 @@ class StatusBar extends React.Component {
|
|||
});
|
||||
};
|
||||
|
||||
render(): ?React.Element<*> {
|
||||
render(): ?React.Element<any> {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -131,7 +131,7 @@ var TouchableBounce = React.createClass({
|
|||
return 0;
|
||||
},
|
||||
|
||||
render: function(): React.Element<*> {
|
||||
render: function(): React.Element<any> {
|
||||
return (
|
||||
<Animated.View
|
||||
style={[{transform: [{scale: this.state.scale}]}, this.props.style]}
|
||||
|
|
|
@ -147,7 +147,7 @@ const TouchableWithoutFeedback = React.createClass({
|
|||
return this.props.delayPressOut || 0;
|
||||
},
|
||||
|
||||
render: function(): React.Element<*> {
|
||||
render: function(): React.Element<any> {
|
||||
// Note(avik): remove dynamic typecast once Flow has been upgraded
|
||||
const child = React.Children.only(this.props.children);
|
||||
let children = child.props.children;
|
||||
|
|
|
@ -76,7 +76,7 @@ class NavigationCard extends React.Component<any, Props, any> {
|
|||
style: PropTypes.any,
|
||||
};
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
const {
|
||||
panHandlers,
|
||||
pointerEvents,
|
||||
|
|
|
@ -202,7 +202,7 @@ class NavigationCardStack extends React.Component<DefaultProps, Props, void> {
|
|||
this._renderScene = this._renderScene.bind(this);
|
||||
}
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<NavigationTransitioner
|
||||
navigationState={this.props.navigationState}
|
||||
|
@ -212,7 +212,7 @@ class NavigationCardStack extends React.Component<DefaultProps, Props, void> {
|
|||
);
|
||||
}
|
||||
|
||||
_render(props: NavigationTransitionProps): React.Element<*> {
|
||||
_render(props: NavigationTransitionProps): React.Element<any> {
|
||||
const {
|
||||
renderHeader
|
||||
} = this.props;
|
||||
|
@ -237,7 +237,7 @@ class NavigationCardStack extends React.Component<DefaultProps, Props, void> {
|
|||
);
|
||||
}
|
||||
|
||||
_renderScene(props: NavigationSceneRendererProps): React.Element<*> {
|
||||
_renderScene(props: NavigationSceneRendererProps): React.Element<any> {
|
||||
const isVertical = this.props.direction === 'vertical';
|
||||
|
||||
const style = isVertical ?
|
||||
|
|
|
@ -43,7 +43,7 @@ const {
|
|||
} = ReactNative;
|
||||
|
||||
type Props = {
|
||||
children?: React.Element<*>,
|
||||
children?: React.Element<any>,
|
||||
style?: any,
|
||||
textStyle?: any,
|
||||
viewProps?: any,
|
||||
|
|
|
@ -86,7 +86,7 @@ function create(
|
|||
this._bindPosition(nextProps);
|
||||
}
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
this._pointerEvents = this._computePointerEvents();
|
||||
return (
|
||||
<Component
|
||||
|
|
|
@ -152,7 +152,7 @@ class Incremental extends React.Component<DefaultProps, Props, State> {
|
|||
}).done();
|
||||
}
|
||||
|
||||
render(): ?React.Element<*> {
|
||||
render(): ?React.Element<any> {
|
||||
if (this._rendered || // Make sure that once we render once, we stay rendered even if incrementalGroupEnabled gets flipped.
|
||||
!this.context.incrementalGroupEnabled ||
|
||||
this.state.doIncrementalRender) {
|
||||
|
|
|
@ -124,7 +124,7 @@ class IncrementalExample extends React.Component {
|
|||
console.log('onDone:', stats);
|
||||
}, 0);
|
||||
}
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<IncrementalGroup
|
||||
disabled={false}
|
||||
|
|
|
@ -65,7 +65,7 @@ class IncrementalGroup extends React.Component {
|
|||
};
|
||||
}
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<Incremental
|
||||
onDone={this.props.onDone}
|
||||
|
|
|
@ -65,7 +65,7 @@ class SwipeableListView extends React.Component {
|
|||
props: Props;
|
||||
state: State;
|
||||
|
||||
_listViewRef: ?React.Element<*> = null;
|
||||
_listViewRef: ?React.Element<any> = null;
|
||||
_shouldBounceFirstRowOnMount: boolean = false;
|
||||
|
||||
static getNewDataSource(): Object {
|
||||
|
@ -118,7 +118,7 @@ class SwipeableListView extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<ListView
|
||||
{...this.props}
|
||||
|
@ -163,7 +163,7 @@ class SwipeableListView extends React.Component {
|
|||
}
|
||||
}
|
||||
|
||||
_renderRow = (rowData: Object, sectionID: string, rowID: string): React.Element<*> => {
|
||||
_renderRow = (rowData: Object, sectionID: string, rowID: string): React.Element<any> => {
|
||||
const slideoutView = this.props.renderQuickActions(rowData, sectionID, rowID);
|
||||
|
||||
// If renderRowSlideout is unspecified or returns falsey, don't allow swipe
|
||||
|
|
|
@ -59,7 +59,7 @@ class SwipeableQuickActionButton extends React.Component {
|
|||
textStyle: Text.propTypes.style,
|
||||
};
|
||||
|
||||
render(): ?React.Element<*> {
|
||||
render(): ?React.Element<any> {
|
||||
if (!this.props.imageSource && !this.props.text) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ class SwipeableQuickActions extends React.Component {
|
|||
style: View.propTypes.style,
|
||||
};
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
// $FlowFixMe found when converting React.createClass to ES6
|
||||
const children = this.props.children;
|
||||
let buttons = [];
|
||||
|
|
|
@ -168,7 +168,7 @@ const SwipeableRow = React.createClass({
|
|||
return true;
|
||||
},
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
// The view hidden behind the main view
|
||||
let slideOutView;
|
||||
if (this.state.isSwipeableViewRendered) {
|
||||
|
|
|
@ -90,15 +90,15 @@ type Props = {
|
|||
*/
|
||||
renderRow: (
|
||||
rowData: any, sectionIdx: number, rowIdx: number, rowKey: string
|
||||
) => ?React.Element<*>,
|
||||
) => ?React.Element<any>,
|
||||
/**
|
||||
* Rendered when the list is scrolled faster than rows can be rendered.
|
||||
*/
|
||||
renderWindowBoundaryIndicator?: () => ?React.Element<*>,
|
||||
renderWindowBoundaryIndicator?: () => ?React.Element<any>,
|
||||
/**
|
||||
* Always rendered at the bottom of all the rows.
|
||||
*/
|
||||
renderFooter?: () => ?React.Element<*>,
|
||||
renderFooter?: () => ?React.Element<any>,
|
||||
/**
|
||||
* Pipes through normal onScroll events from the underlying `ScrollView`.
|
||||
*/
|
||||
|
@ -138,7 +138,7 @@ type Props = {
|
|||
* A function that returns the scrollable component in which the list rows
|
||||
* are rendered. Defaults to returning a ScrollView with the given props.
|
||||
*/
|
||||
renderScrollComponent: (props: ?Object) => React.Element<*>,
|
||||
renderScrollComponent: (props: ?Object) => React.Element<any>,
|
||||
/**
|
||||
* Use to disable incremental rendering when not wanted, e.g. to speed up initial render.
|
||||
*/
|
||||
|
@ -431,7 +431,7 @@ class WindowedListView extends React.Component {
|
|||
this._firstVisible = newFirstVisible;
|
||||
this._lastVisible = newLastVisible;
|
||||
}
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
const {firstRow} = this.state;
|
||||
const lastRow = clamp(0, this.state.lastRow, this.props.data.length - 1);
|
||||
const rowFrames = this._rowFrames;
|
||||
|
@ -586,7 +586,7 @@ type CellProps = {
|
|||
*/
|
||||
renderRow: (
|
||||
rowData: mixed, sectionIdx: number, rowIdx: number, rowKey: string
|
||||
) => ?React.Element<*>,
|
||||
) => ?React.Element<any>,
|
||||
/**
|
||||
* Index of the row, passed through to other callbacks.
|
||||
*/
|
||||
|
|
|
@ -58,7 +58,7 @@ class NetworkOverlay extends React.Component {
|
|||
_listViewHighlighted: bool;
|
||||
_listViewHeight: number;
|
||||
_scrollView: ?ScrollView;
|
||||
_detailViewItems: Array<Array<React.Element<*>>>;
|
||||
_detailViewItems: Array<Array<React.Element<any>>>;
|
||||
_listViewOnLayout: (event: Event) => void;
|
||||
_captureRequestListView: (listRef: ?ListView) => void;
|
||||
_captureDetailScrollView: (scrollRef: ?ScrollView) => void;
|
||||
|
@ -67,8 +67,8 @@ class NetworkOverlay extends React.Component {
|
|||
sectionID: number,
|
||||
rowID: number,
|
||||
highlightRow: (sectionID: number, rowID: number) => void,
|
||||
) => React.Element<*>;
|
||||
_renderScrollComponent: (props: Object) => React.Element<*>;
|
||||
) => React.Element<any>;
|
||||
_renderScrollComponent: (props: Object) => React.Element<any>;
|
||||
_closeButtonClicked: () => void;
|
||||
// Map of `socketId` -> `index in `_requests``.
|
||||
_socketIdMap: Object;
|
||||
|
@ -294,7 +294,7 @@ class NetworkOverlay extends React.Component {
|
|||
sectionID: number,
|
||||
rowID: number,
|
||||
highlightRow: (sectionID: number, rowID: number) => void,
|
||||
): React.Element<*> {
|
||||
): React.Element<any> {
|
||||
let urlCellViewStyle = styles.urlEvenCellView;
|
||||
let methodCellViewStyle = styles.methodEvenCellView;
|
||||
if (rowID % 2 === 1) {
|
||||
|
@ -327,7 +327,7 @@ class NetworkOverlay extends React.Component {
|
|||
_renderSeperator(
|
||||
sectionID: number,
|
||||
rowID: number,
|
||||
adjacentRowHighlighted: bool): React.Element<*> {
|
||||
adjacentRowHighlighted: bool): React.Element<any> {
|
||||
return (
|
||||
<View
|
||||
key={`${sectionID}-${rowID}`}
|
||||
|
@ -367,7 +367,7 @@ class NetworkOverlay extends React.Component {
|
|||
this._listViewHeight = height;
|
||||
}
|
||||
|
||||
_renderScrollComponent(props: Object): React.Element<*> {
|
||||
_renderScrollComponent(props: Object): React.Element<any> {
|
||||
return (
|
||||
<RecyclerViewBackedScrollView {...props} />
|
||||
);
|
||||
|
|
|
@ -129,7 +129,7 @@ class Modal extends React.Component {
|
|||
visible: true,
|
||||
};
|
||||
|
||||
render(): ?React.Element<*> {
|
||||
render(): ?React.Element<any> {
|
||||
if (this.props.visible === false) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -175,7 +175,7 @@ class NavigationTransitioner extends React.Component<any, Props, State> {
|
|||
});
|
||||
}
|
||||
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
return (
|
||||
<View
|
||||
onLayout={this._onLayout}
|
||||
|
|
|
@ -114,7 +114,7 @@ export type NavigationAnimationSetter = (
|
|||
|
||||
export type NavigationSceneRenderer = (
|
||||
props: NavigationSceneRendererProps,
|
||||
) => ?React.Element<*>;
|
||||
) => ?React.Element<any>;
|
||||
|
||||
export type NavigationStyleInterpolator = (
|
||||
props: NavigationSceneRendererProps,
|
||||
|
|
|
@ -44,7 +44,7 @@ const _takeSnapshot = UIManager.takeSnapshot;
|
|||
* @platform ios
|
||||
*/
|
||||
UIManager.takeSnapshot = async function(
|
||||
view ?: 'window' | React.Element<*> | number,
|
||||
view ?: 'window' | React.Element<any> | number,
|
||||
options ?: {
|
||||
width ?: number,
|
||||
height ?: number,
|
||||
|
|
|
@ -221,7 +221,7 @@ const Text = React.createClass({
|
|||
touchableHandlePress: (null: ?Function),
|
||||
touchableHandleLongPress: (null: ?Function),
|
||||
touchableGetPressRectOffset: (null: ?Function),
|
||||
render(): React.Element<*> {
|
||||
render(): React.Element<any> {
|
||||
let newProps = this.props;
|
||||
if (this.props.onStartShouldSetResponder || this._hasPressHandler()) {
|
||||
if (!this._handlers) {
|
||||
|
|
Loading…
Reference in New Issue