Skip to content

Commit 827d829

Browse files
committed
update
1 parent 3c47352 commit 827d829

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/components/AggregationPanel/AggregationPanel.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const AggregationPanel = ({
4747
) : shouldShowAggregatedData ? (
4848
data.panel.segments.map((segment, index) => (
4949
<div key={index}>
50-
<h2 className={styles.heading}>{segment.title}</h2>
50+
<h2 className={styles.heading} style={{'--fontColor': segment.titleFontColor || undefined, '--backgroundColor': segment.titleBackgroundColor || undefined }}>{segment.title}</h2>
5151
<div className={styles.segmentItems}>
5252
{segment.items.map((item, idx) => {
5353
switch (item.type) {

src/components/AggregationPanel/AggregationPanel.scss

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
margin-top: 0;
66
padding: 8px;
77
padding-left: 10px;
8-
background-color: $blue;
9-
color: $white;
8+
background-color: var(--backgroundColor, $blue);
9+
color: var(--fontColor, $white);
1010
}
1111

1212
.segmentItems {
@@ -24,6 +24,8 @@
2424
font-size: 14px;
2525
display: flex;
2626
gap: 10px;
27+
background-color: var(--backgroundColor, inherit);
28+
color: var(--fontColor, inherit);
2729
}
2830

2931
.video {
@@ -66,10 +68,10 @@
6668
text-overflow: ellipsis;
6769
cursor: pointer;
6870
margin-bottom: 15px;
69-
background-color: $blue;
71+
background-color:var(--backgroundColor, $blue);
7072
padding: 3px 13px;
7173
border: none;
72-
color: $white;
74+
color:var(--fontColor, $white);
7375
line-height: 28px;
7476
outline: 0;
7577
text-decoration: none;
@@ -78,7 +80,7 @@
7880
font-size: 14px;
7981
&:hover,
8082
&:focus {
81-
background-color: $darkBlue;
83+
background-color: var(--onhoverBackgroundColor, $blue);
8284
}
8385
}
8486

src/components/AggregationPanel/AggregationPanelComponents.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const TextElement = ({ text }) => (
1010

1111
// Key-Value Element Component
1212
export const KeyValueElement = ({ item }) => (
13-
<div className={styles.keyValue}>
13+
<div className={styles.keyValue} style={{'--fontColor': item.fontColor || undefined, '--backgroundColor': item.backgroundColor || undefined }}>
1414
{item.key}:
1515
{item.url ? <a href={item.url} target="_blank">{item.value}</a> : <span>{item.value}</span>}
1616
</div>
@@ -89,7 +89,7 @@ export const ButtonElement = ({ item, showNote }) => {
8989

9090
return (
9191
<div className={styles.buttonContainer}>
92-
<button onClick={handleClick} className={styles.button}>
92+
<button onClick={handleClick} className={styles.button} style={{'--fontColor': item.fontColor || undefined, '--backgroundColor': item.backgroundColor || undefined , '--onhoverBackgroundColor' : item.onhoverBackgroundColor || undefined}}>
9393
{item.text}
9494
</button>
9595
</div>

0 commit comments

Comments
 (0)