chaser-components
Advanced tools
Comparing version 0.3.8 to 0.3.9
@@ -651,3 +651,3 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var style$7 = {"healthScore":"_27RmL","small":"_3A1iT","healthy":"_d1_Zw","average":"_1XVcz","unhealthy":"_3OPFu","NA":"_1yA3K","large":"_b6lBj","text":"_2u2Jt"}; | ||
var style$7 = {"healthScore":"_27RmL","small":"_3A1iT","healthy":"_d1_Zw","average":"_1XVcz","unhealthy":"_3OPFu","NA":"_1yA3K","large":"_b6lBj","text":"_2u2Jt","active":"_31lmN"}; | ||
@@ -679,2 +679,3 @@ const SmallHealthscore = ({ | ||
className, | ||
isActive, | ||
isProcessing, | ||
@@ -698,3 +699,3 @@ ...props | ||
const healthScoreClass = cx(style$7.healthScore, style$7[getHealthColorClassName(score)], style$7[size], className); | ||
const healthScoreClass = cx(style$7.healthScore, style$7[getHealthColorClassName(score)], style$7[size], isActive && style$7.active, className); | ||
if (size == "small") return /*#__PURE__*/React__default.createElement(SmallHealthscore, _extends({ | ||
@@ -701,0 +702,0 @@ score: score, |
@@ -647,3 +647,3 @@ import cx from 'classnames'; | ||
var style$7 = {"healthScore":"_27RmL","small":"_3A1iT","healthy":"_d1_Zw","average":"_1XVcz","unhealthy":"_3OPFu","NA":"_1yA3K","large":"_b6lBj","text":"_2u2Jt"}; | ||
var style$7 = {"healthScore":"_27RmL","small":"_3A1iT","healthy":"_d1_Zw","average":"_1XVcz","unhealthy":"_3OPFu","NA":"_1yA3K","large":"_b6lBj","text":"_2u2Jt","active":"_31lmN"}; | ||
@@ -675,2 +675,3 @@ const SmallHealthscore = ({ | ||
className, | ||
isActive, | ||
isProcessing, | ||
@@ -694,3 +695,3 @@ ...props | ||
const healthScoreClass = cx(style$7.healthScore, style$7[getHealthColorClassName(score)], style$7[size], className); | ||
const healthScoreClass = cx(style$7.healthScore, style$7[getHealthColorClassName(score)], style$7[size], isActive && style$7.active, className); | ||
if (size == "small") return /*#__PURE__*/React__default.createElement(SmallHealthscore, _extends({ | ||
@@ -697,0 +698,0 @@ score: score, |
{ | ||
"name": "chaser-components", | ||
"description": "Chaser HQ Component Library", | ||
"version": "0.3.8", | ||
"version": "0.3.9", | ||
"main": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "module": "dist/index.modern.js", |
@@ -6,3 +6,2 @@ import cx from 'classnames'; | ||
import React from 'react'; | ||
import style from './Healthscore.module.scss'; | ||
@@ -25,3 +24,3 @@ | ||
const Healthscore = ({ size, score, className, isProcessing, ...props }) => { | ||
const Healthscore = ({ size, score, className, isActive, isProcessing, ...props }) => { | ||
function getHealthText(score, isProcessing) { | ||
@@ -42,3 +41,3 @@ if (isProcessing) return "Updating..." | ||
const healthScoreClass = cx(style.healthScore, style[getHealthColorClassName(score)], style[size], className); | ||
const healthScoreClass = cx(style.healthScore, style[getHealthColorClassName(score)], style[size], isActive && style.active, className); | ||
if (size == "small") return <SmallHealthscore score={score} isProcessing={isProcessing} className={healthScoreClass} {...props} />; | ||
@@ -45,0 +44,0 @@ return <LargeHealthscore isProcessing={isProcessing} text={getHealthText(score, isProcessing)} score={score} className={healthScoreClass} {...props} />; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
357863
4814