@@ -3,7 +3,7 @@ import { View, Text } from 'react-native';
33import PropTypes from 'prop-types' ;
44import { getStyles } from './rules' ;
55
6- const Speedometer = ( { value, totalValue, size, outerColor, innerColor, internalColor, style, showText, text, textStyle, showLabels, labelStyle, showPercent, percentStyle } ) => {
6+ const Speedometer = ( { value, totalValue, size, outerColor, innerColor, internalColor, style, innerCircleStyle , outerCircleStyle , halfCircleStyle , showText, text, textStyle, showLabels, labelStyle, showPercent, percentStyle } ) => {
77 const styles = getStyles ( size ) ;
88 const degreesValue = ( value > totalValue ) ? totalValue : value ;
99 const percentValue = parseInt ( String ( ( value * 100 ) / totalValue ) . split ( '.' ) [ 0 ] ) ;
@@ -30,9 +30,9 @@ const Speedometer = ({ value, totalValue, size, outerColor, innerColor, internal
3030
3131 return (
3232 < View style = { style } >
33- < View style = { [ styles . outerCircle , { backgroundColor : outerColor } ] } >
34- < View style = { [ styles . halfCircle , degressStyle ] } />
35- < View style = { [ styles . innerCircle , { backgroundColor : innerColor } ] } >
33+ < View style = { [ styles . outerCircle , { backgroundColor : outerColor } , outerCircleStyle ] } >
34+ < View style = { [ styles . halfCircle , degressStyle , halfCircleStyle ] } />
35+ < View style = { [ styles . innerCircle , { backgroundColor : innerColor } , innerCircleStyle ] } >
3636 { percentElement }
3737 { textElement }
3838 </ View >
@@ -60,6 +60,9 @@ Speedometer.propTypes = {
6060 labelStyle : PropTypes . object ,
6161 showPercent : PropTypes . bool ,
6262 percentStyle : PropTypes . object ,
63+ innerCircleStyle : PropTypes . object ,
64+ outerCircleStyle : PropTypes . object ,
65+ halfCircleStyle : PropTypes . object ,
6366} ;
6467
6568Speedometer . defaultProps = {
0 commit comments