diff --git a/CHANGELOG.md b/CHANGELOG.md index ecd2617..933a97a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - TimePicker component by [@amit-y](https://github.com/amit-y) +## [1.17.1] - 2023-12-18 + +- add option to enable title's tooltip + change up/down trend arrow colors to grey by [@shahramk](https://github.com/shahramk) + ## [1.17.0] - 2023-12-14 ### Added diff --git a/package-lock.json b/package-lock.json index 097ab7b..d4f1f39 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@newrelic/nr-labs-components", - "version": "1.17.0", + "version": "1.18.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@newrelic/nr-labs-components", - "version": "1.17.0", + "version": "1.18.0", "license": "Apache-2.0", "dependencies": { "dayjs": "^1.11.7" diff --git a/package.json b/package.json index 3ccea2c..75059d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@newrelic/nr-labs-components", - "version": "1.17.0", + "version": "1.18.0", "description": "New Relic Labs components", "main": "dist/index.js", "module": "dist/index.es.js", diff --git a/src/components/simple-billboard/README.md b/src/components/simple-billboard/README.md index bc5d604..05eb94c 100644 --- a/src/components/simple-billboard/README.md +++ b/src/components/simple-billboard/README.md @@ -47,6 +47,7 @@ and the code snippet to use the component: name: PropTypes.string, // required - metric name style: PropTypes.object, // optional - SCSS class name for metric name className: PropTypes.string, // optional - SCSS style for metric name + toolTip: PropTypes.bool // optional - enable tool tip for metric name (default: false) }), }; ``` diff --git a/src/components/simple-billboard/index.js b/src/components/simple-billboard/index.js index 053fe00..1d6b5b4 100644 --- a/src/components/simple-billboard/index.js +++ b/src/components/simple-billboard/index.js @@ -8,7 +8,7 @@ import styles from './styles.scss'; /** * @param {Object} metric - metric value, previousValue, optional: prefix, suffix, className, style * @param {Object} statusTrend - optional: className, style - * @param {Object} title - metric name, optional: className, style + * @param {Object} title - metric name, optional: className, style, toolTip * @return {JSX Object} - RENDERING name, value, up/down trend when previousValue present */ const SimpleBillboard = ({ metric, statusTrend = {}, title }) => { @@ -58,20 +58,15 @@ const SimpleBillboard = ({ metric, statusTrend = {}, title }) => { }; const icon = difference > 0 - ? { - type: 'uparrow', - fill: '#02865B', - } - : { - type: 'downarrow', - fill: '#DF2D24', - }; + ? { type: 'uparrow', } + : { type: 'downarrow', }; + return ( { }, [difference]); return ( -
+
{ {changeStatus}
- + {title.toolTip ? ( + +
+ {title.name} +
+
+ ) : (
{ > {title.name}
-
+ )}
); }; @@ -125,6 +131,7 @@ SimpleBillboard.propTypes = { name: PropTypes.string, style: PropTypes.object, className: PropTypes.string, + toolTip: PropTypes.bool, }), }; diff --git a/src/components/simple-billboard/simple-billboard.png b/src/components/simple-billboard/simple-billboard.png index 92ff4e1..b028b3f 100644 Binary files a/src/components/simple-billboard/simple-billboard.png and b/src/components/simple-billboard/simple-billboard.png differ