Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,34 +95,34 @@ const styles = StyleSheet.create({
minValue: 0,
maxValue: 100,
easeDuration: 500,
labels: [
labels: [
{
name: 'Too Slow',
name: 'Pathetically weak',
labelColor: '#ff2900',
activeBarColor: '#ff2900',
},
{
name: 'Very Slow',
name: 'Very weak',
labelColor: '#ff5400',
activeBarColor: '#ff5400',
},
{
name: 'Slow',
name: 'So-so',
labelColor: '#f4ab44',
activeBarColor: '#f4ab44',
},
{
name: 'Normal',
name: 'Fair',
labelColor: '#f2cf1f',
activeBarColor: '#f2cf1f',
},
{
name: 'Fast',
name: 'Strong',
labelColor: '#14eb6e',
activeBarColor: '#14eb6e',
},
{
name: 'Unbelievably Fast',
name: 'Unbelievably strong',
labelColor: '#00ff6b',
activeBarColor: '#00ff6b',
},
Expand Down
8 changes: 7 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class Speedometer extends Component {
const circleDegree = 90 + (index * perLevelDegree);
return (
<View
key={level.name}
key={level.id}
style={[style.halfCircle, {
backgroundColor: level.activeBarColor,
width: currentSize / 2,
Expand Down Expand Up @@ -149,31 +149,37 @@ Speedometer.defaultProps = {
allowedDecimals: 0,
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',
Expand Down