File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ export default function CommunitiesMap({ communities }: CommunitiesMapProps) {
6464 location : c . location || '' ,
6565 link : c . joinLink ,
6666 logo : c . logo || '' ,
67+ activity : c . activityLevel ,
6768 }
6869 } )
6970
@@ -236,6 +237,7 @@ export default function CommunitiesMap({ communities }: CommunitiesMapProps) {
236237 link : community . link ,
237238 location : community . location ,
238239 logo : community . logo ,
240+ activity : community . activity ,
239241 baseSize :
240242 community . type === 'city'
241243 ? 0.25
@@ -316,7 +318,11 @@ export default function CommunitiesMap({ communities }: CommunitiesMapProps) {
316318 const locationLine = location
317319 ? `<span class="location-text"><svg class="location-icon" width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><path fill-rule="evenodd" clip-rule="evenodd" d="M6 1a3.5 3.5 0 0 0-3.5 3.5c0 2.5 3.5 6.5 3.5 6.5s3.5-4 3.5-6.5A3.5 3.5 0 0 0 6 1Zm0 5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Z" fill="currentColor"/></svg>${ location } </span>`
318320 : ''
319- return `<div class="tooltip-header">${ headerImage } <div class="tooltip-title-block"><strong class="paragraph-small-bold">${ name } </strong>${ locationLine } </div></div>${ description } `
321+ const inactiveBadge =
322+ props ?. activity === 'Inactive'
323+ ? '<span class="tooltip-inactive-badge">Inactive</span>'
324+ : ''
325+ return `<div class="tooltip-header">${ headerImage } <div class="tooltip-title-block"><strong class="paragraph-small-bold">${ name } </strong>${ inactiveBadge } ${ locationLine } </div></div>${ description } `
320326 }
321327
322328 function updateTooltipPosition (
Original file line number Diff line number Diff line change 147147 min-width : 0 ;
148148}
149149
150+ /* align-self keeps the pill hugging its text — without it the flex column
151+ stretches the border across the tooltip's full width. */
152+ : global (# mapbox-tooltip .tooltip-inactive-badge ) {
153+ align-self : flex-start;
154+ padding : 1px 8px ;
155+ border : 1px solid var (--teal-600 );
156+ border-radius : 999px ;
157+ color : var (--teal-300 );
158+ }
159+
150160: global (# mapbox-tooltip .location-text ) {
151161 display : inline-flex;
152162 align-items : center;
You can’t perform that action at this time.
0 commit comments