From 0d1b319005f6bdcb3044b74a221bce0eba389498 Mon Sep 17 00:00:00 2001 From: Victor Calvello Date: Mon, 5 Nov 2018 13:55:46 -0800 Subject: [PATCH] Remove unused styles (#22083) Summary: Removes unused styles. NOTE: Lint rule `react-native/no-unused-styles` not added because of custom lint rule internally at Facebook that does this. Pull Request resolved: https://github.com/facebook/react-native/pull/22083 Differential Revision: D12929443 Pulled By: TheSavior fbshipit-source-id: d42b0be3db745e445447e65df3b78b61f53e4229 --- js/AssetScaledImageExample.js | 4 ---- js/CameraRollView.js | 7 ------- js/ImageCapInsetsExample.js | 6 ------ js/LayoutAnimationExample.js | 3 --- js/LinkingExample.js | 6 ------ js/ListViewPagingExample.js | 7 ------- js/PermissionsExampleAndroid.android.js | 4 ---- js/PointerEventsExample.js | 3 --- js/RNTesterBlock.js | 10 ---------- js/SliderExample.js | 4 ---- js/StatusBarExample.js | 5 ----- js/TextInputExample.ios.js | 10 ---------- js/TouchableExample.js | 4 ---- js/WebViewExample.js | 4 ---- 14 files changed, 77 deletions(-) diff --git a/js/AssetScaledImageExample.js b/js/AssetScaledImageExample.js index 8a70b61c62f..fb50653a1de 100644 --- a/js/AssetScaledImageExample.js +++ b/js/AssetScaledImageExample.js @@ -57,10 +57,6 @@ const styles = StyleSheet.create({ flexDirection: 'row', alignSelf: 'center', }, - textColumn: { - flex: 1, - flexDirection: 'column', - }, imageWide: { borderWidth: 1, borderColor: 'black', diff --git a/js/CameraRollView.js b/js/CameraRollView.js index 42480ee292c..159edb7d8e9 100644 --- a/js/CameraRollView.js +++ b/js/CameraRollView.js @@ -259,16 +259,9 @@ const styles = StyleSheet.create({ flexDirection: 'row', flex: 1, }, - url: { - fontSize: 9, - marginBottom: 14, - }, image: { margin: 4, }, - info: { - flex: 1, - }, container: { flex: 1, }, diff --git a/js/ImageCapInsetsExample.js b/js/ImageCapInsetsExample.js index ae122fe0271..546c639577d 100644 --- a/js/ImageCapInsetsExample.js +++ b/js/ImageCapInsetsExample.js @@ -57,17 +57,11 @@ const styles = StyleSheet.create({ justifyContent: 'center', alignItems: 'center', }, - horizontal: { - flexDirection: 'row', - }, storyBackground: { width: 250, height: 150, borderWidth: 1, }, - text: { - fontSize: 13.5, - }, }); module.exports = ImageCapInsetsExample; diff --git a/js/LayoutAnimationExample.js b/js/LayoutAnimationExample.js index 6b8c0272e63..184c3d5b29c 100644 --- a/js/LayoutAnimationExample.js +++ b/js/LayoutAnimationExample.js @@ -156,9 +156,6 @@ const styles = StyleSheet.create({ padding: 10, marginBottom: 10, }, - buttonText: { - fontSize: 16, - }, viewContainer: { flex: 1, flexDirection: 'row', diff --git a/js/LinkingExample.js b/js/LinkingExample.js index 89ac48ca832..318341fbe6d 100644 --- a/js/LinkingExample.js +++ b/js/LinkingExample.js @@ -65,12 +65,6 @@ class IntentAndroidExample extends React.Component { } const styles = StyleSheet.create({ - container: { - flex: 1, - backgroundColor: 'white', - padding: 10, - paddingTop: 30, - }, button: { padding: 10, backgroundColor: '#3B5998', diff --git a/js/ListViewPagingExample.js b/js/ListViewPagingExample.js index a19e3afd040..8c81d62cb9e 100644 --- a/js/ListViewPagingExample.js +++ b/js/ListViewPagingExample.js @@ -223,13 +223,6 @@ const styles = StyleSheet.create({ color: 'white', paddingHorizontal: 8, }, - rowText: { - color: '#888888', - }, - thumbText: { - fontSize: 20, - color: '#888888', - }, buttonContents: { flexDirection: 'row', justifyContent: 'center', diff --git a/js/PermissionsExampleAndroid.android.js b/js/PermissionsExampleAndroid.android.js index 285b2827f31..b624514114c 100644 --- a/js/PermissionsExampleAndroid.android.js +++ b/js/PermissionsExampleAndroid.android.js @@ -119,10 +119,6 @@ const styles = StyleSheet.create({ flex: 1, backgroundColor: 'white', }, - singleLine: { - fontSize: 16, - padding: 4, - }, text: { margin: 10, }, diff --git a/js/PointerEventsExample.js b/js/PointerEventsExample.js index 73552838d15..4c9d8fa15c9 100644 --- a/js/PointerEventsExample.js +++ b/js/PointerEventsExample.js @@ -230,9 +230,6 @@ const styles = StyleSheet.create({ borderColor: '#f0f0f0', backgroundColor: '#f9f9f9', }, - bottomSpacer: { - marginBottom: 100, - }, }); exports.framework = 'React'; diff --git a/js/RNTesterBlock.js b/js/RNTesterBlock.js index 483d1b68da2..6999668e6ac 100644 --- a/js/RNTesterBlock.js +++ b/js/RNTesterBlock.js @@ -69,16 +69,6 @@ const styles = StyleSheet.create({ descriptionText: { fontSize: 14, }, - disclosure: { - position: 'absolute', - top: 0, - right: 0, - padding: 10, - }, - disclosureIcon: { - width: 12, - height: 8, - }, children: { margin: 10, }, diff --git a/js/SliderExample.js b/js/SliderExample.js index 22f0da2f02f..e4cb899d810 100644 --- a/js/SliderExample.js +++ b/js/SliderExample.js @@ -69,10 +69,6 @@ class SlidingCompleteExample extends React.Component< } const styles = StyleSheet.create({ - slider: { - height: 10, - margin: 10, - }, text: { fontSize: 14, textAlign: 'center', diff --git a/js/StatusBarExample.js b/js/StatusBarExample.js index 58b87ab53f3..dece8e23fa2 100644 --- a/js/StatusBarExample.js +++ b/js/StatusBarExample.js @@ -518,11 +518,6 @@ const styles = StyleSheet.create({ backgroundColor: '#eeeeee', padding: 10, }, - title: { - marginTop: 16, - marginBottom: 8, - fontWeight: 'bold', - }, modalButton: { marginTop: 10, }, diff --git a/js/TextInputExample.ios.js b/js/TextInputExample.ios.js index 4de3908ea90..1240ba2d289 100644 --- a/js/TextInputExample.ios.js +++ b/js/TextInputExample.ios.js @@ -490,9 +490,6 @@ class AutogrowingTextInputExample extends React.Component< } const styles = StyleSheet.create({ - page: { - paddingBottom: 300, - }, default: { borderWidth: StyleSheet.hairlineWidth, borderColor: '#0f0f0f', @@ -520,13 +517,6 @@ const styles = StyleSheet.create({ fontFamily: 'Cochin', height: 60, }, - multilineChild: { - width: 50, - height: 40, - position: 'absolute', - right: 5, - backgroundColor: 'red', - }, eventLabel: { margin: 3, fontSize: 12, diff --git a/js/TouchableExample.js b/js/TouchableExample.js index fe6aad74dcc..34ddd72dec5 100644 --- a/js/TouchableExample.js +++ b/js/TouchableExample.js @@ -467,10 +467,6 @@ const styles = StyleSheet.create({ justifyContent: 'center', flexDirection: 'row', }, - icon: { - width: 24, - height: 24, - }, image: { width: 50, height: 50, diff --git a/js/WebViewExample.js b/js/WebViewExample.js index aee3a2adf2f..f973d816210 100644 --- a/js/WebViewExample.js +++ b/js/WebViewExample.js @@ -362,10 +362,6 @@ const styles = StyleSheet.create({ color: 'white', fontSize: 13, }, - spinner: { - width: 20, - marginRight: 6, - }, buttons: { flexDirection: 'row', height: 30,