Skip to content

Commit

Permalink
Fix color
Browse files Browse the repository at this point in the history
  • Loading branch information
joao-vasconcelos committed Dec 12, 2023
1 parent 8f0758b commit 6853146
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/opengraph/OpenGraphStopsDynamic.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default function OpenGraphStopsDynamic({ stopData, allLinesData }) {
)}
<div style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', gap: 25 }}>
{allLinesData.slice(0, availableSlotsForLines).map((item) => (
<OpenGraphLineBadge key={item.id} shortName={item.short_name} />
<OpenGraphLineBadge key={item.id} shortName={item.short_name} color={item.color} textColor={item.text_color} />
))}
{extraHiddenLinesAmount > 0 && <OpenGraphExtraHiddenLines amount={extraHiddenLinesAmount} />}
</div>
Expand Down Expand Up @@ -140,7 +140,7 @@ function OpenGraphStopLocation({ locality, municipalityName }) {
);
}

function OpenGraphLineBadge({ shortName }) {
function OpenGraphLineBadge({ shortName, color, textColor }) {
return (
<div
style={{
Expand All @@ -151,12 +151,12 @@ function OpenGraphLineBadge({ shortName }) {
alignItems: 'center',
justifyContent: 'center',
borderRadius: 999,
backgroundColor: '#ED1944',
backgroundColor: color,
fontSize: 50,
fontWeight: 700,
paddingTop: 4,
lineHeight: 1,
color: '#fff',
color: textColor,
}}
>
{shortName}
Expand Down

0 comments on commit 6853146

Please sign in to comment.