From cae0f39c5b2fc2e0d1053af5c4c603922318eb77 Mon Sep 17 00:00:00 2001 From: Abuzar Mirza Date: Tue, 22 Feb 2022 14:31:20 +0530 Subject: [PATCH 1/2] added hide labels functionality --- README.md | 63 ++++++++++++++++++++++++++++++++++++++++++++++------ src/index.js | 8 ++++++- 2 files changed, 63 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b514265..100fe67 100644 --- a/README.md +++ b/README.md @@ -95,34 +95,40 @@ const styles = StyleSheet.create({ minValue: 0, maxValue: 100, easeDuration: 500, - labels: [ + labels: [ { - name: 'Too Slow', + id: 1, + name: 'Pathetically weak', labelColor: '#ff2900', activeBarColor: '#ff2900', }, { - name: 'Very Slow', + id: 2, + name: 'Very weak', labelColor: '#ff5400', activeBarColor: '#ff5400', }, { - name: 'Slow', + id: 3, + name: 'So-so', labelColor: '#f4ab44', activeBarColor: '#f4ab44', }, { - name: 'Normal', + id: 4, + name: 'Fair', labelColor: '#f2cf1f', activeBarColor: '#f2cf1f', }, { - name: 'Fast', + id: 5, + name: 'Strong', labelColor: '#14eb6e', activeBarColor: '#14eb6e', }, { - name: 'Unbelievably Fast', + id: 6, + name: 'Unbelievably strong', labelColor: '#00ff6b', activeBarColor: '#00ff6b', }, @@ -138,6 +144,49 @@ const styles = StyleSheet.create({ labelStyle: {}, labelNoteStyle: {}, ``` +### Hide Labels +``` + + labels: [ + { + id: 1, + name: '', + labelColor: '#ff2900', + activeBarColor: '#ff2900', + }, + { + id: 2, + name: '', + labelColor: '#ff5400', + activeBarColor: '#ff5400', + }, + { + id: 3, + name: '', + labelColor: '#f4ab44', + activeBarColor: '#f4ab44', + }, + { + id: 4, + name: '', + labelColor: '#f2cf1f', + activeBarColor: '#f2cf1f', + }, + { + id: 5, + name: '', + labelColor: '#14eb6e', + activeBarColor: '#14eb6e', + }, + { + id: 6, + name: '', + labelColor: '#00ff6b', + activeBarColor: '#00ff6b', + }, + ], + +``` ## Contribution diff --git a/src/index.js b/src/index.js index 3730609..ab374a6 100644 --- a/src/index.js +++ b/src/index.js @@ -85,7 +85,7 @@ class Speedometer extends Component { const circleDegree = 90 + (index * perLevelDegree); return ( Date: Thu, 24 Feb 2022 11:19:48 +0530 Subject: [PATCH 2/2] removed label changes and extra tab --- README.md | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) diff --git a/README.md b/README.md index 100fe67..efb1595 100644 --- a/README.md +++ b/README.md @@ -97,37 +97,31 @@ const styles = StyleSheet.create({ easeDuration: 500, labels: [ { - id: 1, name: 'Pathetically weak', labelColor: '#ff2900', activeBarColor: '#ff2900', }, { - id: 2, name: 'Very weak', labelColor: '#ff5400', activeBarColor: '#ff5400', }, { - id: 3, name: 'So-so', labelColor: '#f4ab44', activeBarColor: '#f4ab44', }, { - id: 4, name: 'Fair', labelColor: '#f2cf1f', activeBarColor: '#f2cf1f', }, { - id: 5, name: 'Strong', labelColor: '#14eb6e', activeBarColor: '#14eb6e', }, { - id: 6, name: 'Unbelievably strong', labelColor: '#00ff6b', activeBarColor: '#00ff6b', @@ -144,49 +138,6 @@ const styles = StyleSheet.create({ labelStyle: {}, labelNoteStyle: {}, ``` -### Hide Labels -``` - - labels: [ - { - id: 1, - name: '', - labelColor: '#ff2900', - activeBarColor: '#ff2900', - }, - { - id: 2, - name: '', - labelColor: '#ff5400', - activeBarColor: '#ff5400', - }, - { - id: 3, - name: '', - labelColor: '#f4ab44', - activeBarColor: '#f4ab44', - }, - { - id: 4, - name: '', - labelColor: '#f2cf1f', - activeBarColor: '#f2cf1f', - }, - { - id: 5, - name: '', - labelColor: '#14eb6e', - activeBarColor: '#14eb6e', - }, - { - id: 6, - name: '', - labelColor: '#00ff6b', - activeBarColor: '#00ff6b', - }, - ], - -``` ## Contribution