diff --git a/CHANGELOG.md b/CHANGELOG.md index 90957e8..96d7b54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.19.0] - 2023-12-18 + ### Added - TimePicker component by [@amit-y](https://github.com/amit-y) - DateTimePicker component by [@amit-y](https://github.com/amit-y) +## [1.18.0] - 2023-12-18 + +### Changed + +- SimpleBillboard - 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..1084f1f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@newrelic/nr-labs-components", - "version": "1.17.0", + "version": "1.19.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@newrelic/nr-labs-components", - "version": "1.17.0", + "version": "1.19.0", "license": "Apache-2.0", "dependencies": { "dayjs": "^1.11.7" diff --git a/package.json b/package.json index 3ccea2c..79205da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@newrelic/nr-labs-components", - "version": "1.17.0", + "version": "1.19.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