@guardian/interactive-component-library 0.1.0-alpha.32 → 0.1.0-alpha.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -485,7 +485,10 @@ const Waffle = ({
|
|
|
485
485
|
numberOfRows,
|
|
486
486
|
type = WaffleType.circle,
|
|
487
487
|
idAccessor,
|
|
488
|
-
onMouseOver
|
|
488
|
+
onMouseOver = () => {
|
|
489
|
+
},
|
|
490
|
+
onClick = () => {
|
|
491
|
+
},
|
|
489
492
|
styles: styles2
|
|
490
493
|
}) => {
|
|
491
494
|
const containerRef = useRef();
|
|
@@ -510,6 +513,7 @@ const Waffle = ({
|
|
|
510
513
|
attributes = {
|
|
511
514
|
id: unit2[idAccessor] || `w-${j}`,
|
|
512
515
|
onMouseOver: (e) => onMouseOver(unit2, e),
|
|
516
|
+
onClick: (e) => onClick(unit2, e),
|
|
513
517
|
class: `${styles2.unit} ${unit2.class}`,
|
|
514
518
|
height: unitHeight,
|
|
515
519
|
width: unitWidth,
|
|
@@ -520,6 +524,7 @@ const Waffle = ({
|
|
|
520
524
|
attributes = {
|
|
521
525
|
id: unit2[idAccessor] || `w-${j}`,
|
|
522
526
|
onMouseOver: (e) => onMouseOver(unit2, e),
|
|
527
|
+
onClick: (e) => onClick(unit2, e),
|
|
523
528
|
class: `${styles2.unit} ${unit2.class}`,
|
|
524
529
|
r: unitWidth / 2,
|
|
525
530
|
transform: `translate(${unitWidth * Math.floor(j / numberOfRows) + unitWidth / 2}, ${unitHeight * (j % numberOfRows) + unitHeight / 2})`
|
|
@@ -7525,7 +7530,8 @@ function CoalitionsTracker({
|
|
|
7525
7530
|
stack: list.stack,
|
|
7526
7531
|
width: list.width,
|
|
7527
7532
|
height: barChartHeight,
|
|
7528
|
-
createSVG: true
|
|
7533
|
+
createSVG: true,
|
|
7534
|
+
styles: styles2
|
|
7529
7535
|
})]
|
|
7530
7536
|
}, index);
|
|
7531
7537
|
};
|