From 0b3e00f9ffe8c90614a2b28cc76b32bf2cef38fb Mon Sep 17 00:00:00 2001 From: Rachel Shen Date: Tue, 12 Jan 2021 12:30:53 -0700 Subject: [PATCH] fix: create unique ids for dot icons (#971) --- .../src/components/__snapshots__/chart.test.tsx.snap | 2 +- packages/osd-charts/src/components/icons/assets/dot.tsx | 5 +++-- .../components/legend/__snapshots__/legend.test.tsx.snap | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/osd-charts/src/components/__snapshots__/chart.test.tsx.snap b/packages/osd-charts/src/components/__snapshots__/chart.test.tsx.snap index 75b1cc181a2f..fce65eefa4bd 100644 --- a/packages/osd-charts/src/components/__snapshots__/chart.test.tsx.snap +++ b/packages/osd-charts/src/components/__snapshots__/chart.test.tsx.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Chart should render the legend name test 1`] = `"
"`; +exports[`Chart should render the legend name test 1`] = `"
"`; diff --git a/packages/osd-charts/src/components/icons/assets/dot.tsx b/packages/osd-charts/src/components/icons/assets/dot.tsx index d9e99d030532..3c4321869e01 100644 --- a/packages/osd-charts/src/components/icons/assets/dot.tsx +++ b/packages/osd-charts/src/components/icons/assets/dot.tsx @@ -29,13 +29,14 @@ export class DotIcon extends React.Component { } render() { + const { color } = this.props; return ( - + - + ); diff --git a/packages/osd-charts/src/components/legend/__snapshots__/legend.test.tsx.snap b/packages/osd-charts/src/components/legend/__snapshots__/legend.test.tsx.snap index 1eef6397b678..a64f4750d2c7 100644 --- a/packages/osd-charts/src/components/legend/__snapshots__/legend.test.tsx.snap +++ b/packages/osd-charts/src/components/legend/__snapshots__/legend.test.tsx.snap @@ -1,9 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Legend #legendColorPicker should match snapshot after onChange is called 1`] = `"
  • "`; +exports[`Legend #legendColorPicker should match snapshot after onChange is called 1`] = `"
  • "`; -exports[`Legend #legendColorPicker should match snapshot after onClose is called 1`] = `"
  • "`; +exports[`Legend #legendColorPicker should match snapshot after onClose is called 1`] = `"
  • "`; exports[`Legend #legendColorPicker should render colorPicker when color is clicked 1`] = `"
    Custom Color Picker
    "`; -exports[`Legend #legendColorPicker should render colorPicker when color is clicked 2`] = `"
  • Custom Color Picker
  • "`; +exports[`Legend #legendColorPicker should render colorPicker when color is clicked 2`] = `"
  • Custom Color Picker
  • "`;