From 675bc1d7760c1838024e8ecfa7844ee76f159bab Mon Sep 17 00:00:00 2001 From: Joshua Salazar <6354268+SalazarJosh@users.noreply.github.com> Date: Mon, 11 Nov 2024 17:52:36 -0500 Subject: [PATCH] Update location-aside.js added color prop to LayoutWithIcon so we can use more than one color for the icons. Set the colors of each icon to the requested color. --- src/components/location-aside.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/location-aside.js b/src/components/location-aside.js index b7a8d388..62ee3ecf 100644 --- a/src/components/location-aside.js +++ b/src/components/location-aside.js @@ -10,6 +10,7 @@ import React from 'react'; const LayoutWithIcon = ({ // eslint-disable-next-line react/prop-types d: data, + color, palette, children }) => { @@ -29,7 +30,7 @@ const LayoutWithIcon = ({ alignItems: 'center', background: `var(--color-${palette}-100)`, borderRadius: '50%', - color: `var(--color-${palette}-300)`, + color: `var(--color-${palette}-${color})`, display: 'flex', height: '2.5rem', justifyContent: 'center', @@ -46,6 +47,7 @@ const LayoutWithIcon = ({ LayoutWithIcon.propTypes = { children: PropTypes.node, + color: PropTypes.string, data: PropTypes.string, palette: PropTypes.string }; @@ -65,7 +67,7 @@ export default function LocationAside ({ node }) { marginBottom: SPACING['3XL'] }} > - + - + - +