to attach
+ // the onClick which contains a
isn't correct markup.
+ return onClick ? (
+
+ ) : (
+ }
+ >
+
+
+ );
+};
+
+Measure.propTypes = {
+ name: NameType,
+ value: ValueType,
onClick: PropTypes.func,
};
diff --git a/aries-site/src/examples/templates/dashboards/components/StatusBar.js b/aries-site/src/examples/templates/dashboards/components/StatusBar.js
index fe5cda2b6..63cebdf67 100644
--- a/aries-site/src/examples/templates/dashboards/components/StatusBar.js
+++ b/aries-site/src/examples/templates/dashboards/components/StatusBar.js
@@ -4,7 +4,7 @@ import {
Card,
CardBody,
CardHeader,
- NameValueList,
+ Grid,
ThemeContext,
} from 'grommet';
import { DashboardCardHeader } from '.';
@@ -21,13 +21,14 @@ export const StatusBar = ({ children, title, menuItems, ...rest }) => {
-
{children}
-
+
);
diff --git a/aries-site/src/examples/templates/dashboards/content/chartCards/CostByMonth.js b/aries-site/src/examples/templates/dashboards/content/chartCards/CostByMonth.js
index e38f8ec24..fc5484d8f 100644
--- a/aries-site/src/examples/templates/dashboards/content/chartCards/CostByMonth.js
+++ b/aries-site/src/examples/templates/dashboards/content/chartCards/CostByMonth.js
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
-import { Grid, DataChart, Text } from 'grommet';
+import { DataChart, Text, Box, NameValueList } from 'grommet';
import { ChartCard, Measure } from '../../components';
import {
convertDatesToFeatures,
@@ -115,49 +115,40 @@ export const CostByMonth = ({ period }) => {
}
}, [values]);
- const grid = {
- columns: ['auto', 'auto'],
- rows: ['auto', 'auto'],
- areas: [
- ['measure', 'projection'],
- ['chart', 'chart'],
- ],
- gap: 'medium',
- };
-
return (
- {values && (
-
+ {values && (
+
+
+
+
+
-
-
-
+
)}
);
diff --git a/aries-site/src/examples/templates/dashboards/content/chartCards/CostByService.js b/aries-site/src/examples/templates/dashboards/content/chartCards/CostByService.js
index ddbe4c575..eacc68539 100644
--- a/aries-site/src/examples/templates/dashboards/content/chartCards/CostByService.js
+++ b/aries-site/src/examples/templates/dashboards/content/chartCards/CostByService.js
@@ -1,6 +1,13 @@
import { useContext, useEffect, useMemo, useState } from 'react';
import PropTypes from 'prop-types';
-import { Box, Grid, Meter, ResponsiveContext, ThemeContext } from 'grommet';
+import {
+ Box,
+ Grid,
+ Meter,
+ NameValueList,
+ ResponsiveContext,
+ ThemeContext,
+} from 'grommet';
import { parseMetricToNum } from 'grommet/utils';
import { ChartCard, Legend, Measure } from '../../components';
import {
@@ -155,15 +162,20 @@ export const CostByService = ({ period, notification }) => {
size="full"
/>
-
+ >
+
+
)}
diff --git a/aries-site/src/examples/templates/dashboards/content/chartCards/RulesAudit.js b/aries-site/src/examples/templates/dashboards/content/chartCards/RulesAudit.js
index aad360c44..8a99137f6 100644
--- a/aries-site/src/examples/templates/dashboards/content/chartCards/RulesAudit.js
+++ b/aries-site/src/examples/templates/dashboards/content/chartCards/RulesAudit.js
@@ -1,6 +1,6 @@
import { Fragment, useEffect, useState } from 'react';
import PropTypes from 'prop-types';
-import { Box, Grid, Meter, Text } from 'grommet';
+import { Box, Meter, NameValueList, Text } from 'grommet';
import { Calendar } from 'grommet-icons';
import { TextEmphasis } from 'aries-core';
import { ChartCard, Measure, MeterGroup } from '../../components';
@@ -88,15 +88,6 @@ export const RulesAudit = ({ period }) => {
setAuditResults(nextAuditResults);
}, [rules]);
- const grid = {
- columns: ['auto', 'auto', 'auto'],
- rows: ['auto', 'auto'],
- areas: [
- ['rules', 'frameworks', 'audits'],
- ['chart', 'chart', 'chart'],
- ],
- };
-
const nextScheduledAudit = nextAudit && (
{/* Placing the icon within a Text component ensures the icon is
@@ -118,29 +109,30 @@ export const RulesAudit = ({ period }) => {
return (
-
-
-
-
+
+
+
+
+
+
-
+
);
};