Files
react-native/ReactAndroid/src/androidTest/js/ProgressBarTestModule.js
Ignacio Olaciregui 7b3c91ef16 Fix inline styles eslint warnings for examples (#22123)
Summary:
Fixes `react-native/no-inline-styles` warning for several examples. I'm limiting the size of this PR to make it simpler to review.
Pull Request resolved: https://github.com/facebook/react-native/pull/22123

Reviewed By: RSNara

Differential Revision: D12929701

Pulled By: TheSavior

fbshipit-source-id: 7a976f2208b557fcfda46d5b586b30652c550eb2
2018-11-08 17:20:33 -08:00

60 lines
1.5 KiB
JavaScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
'use strict';
const BatchedBridge = require('BatchedBridge');
const React = require('React');
const ReactNative = require('react-native');
const {StyleSheet} = ReactNative;
const ProgressBar = require('ProgressBarAndroid');
const View = require('View');
const renderApplication = require('renderApplication');
class ProgressBarSampleApp extends React.Component {
state = {};
render() {
return (
<View>
<ProgressBar styleAttr="Horizontal" testID="Horizontal" />
<ProgressBar styleAttr="Small" testID="Small" />
<ProgressBar styleAttr="Large" testID="Large" />
<ProgressBar styleAttr="Normal" testID="Normal" />
<ProgressBar styleAttr="Inverse" testID="Inverse" />
<ProgressBar styleAttr="SmallInverse" testID="SmallInverse" />
<ProgressBar styleAttr="LargeInverse" testID="LargeInverse" />
<View style={styles.wrapper}>
<ProgressBar styleAttr="Horizontal" testID="Horizontal200" />
</View>
</View>
);
}
}
const ProgressBarTestModule = {
renderProgressBarApplication: function(rootTag) {
renderApplication(ProgressBarSampleApp, {}, rootTag);
},
};
BatchedBridge.registerCallableModule(
'ProgressBarTestModule',
ProgressBarTestModule,
);
const styles = StyleSheet.create({
wrapper: {
width: 200,
},
});
module.exports = ProgressBarTestModule;