Skip to content

Commit

Permalink
add dom in popup for mapchart
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jan 9, 2024
1 parent e452563 commit 7799405
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/opub-ui/src/components/MapChart/MapChart.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,16 @@ export const Popup: Story = {
if (map) {
map.eachLayer((layer: any) => {
const district = layer.feature?.properties.district
if (district === 'Nagaon' || district === 'Morigaon') {
if (district === 'Nagaon' || district === 'Sonitpur') {
layer
.bindPopup(
() => {
return layer.feature?.properties.district
return `<div>
<strong>${district}</strong>
<span class="block mt-1">
Data: ${layer.feature?.properties.dt_code}
</span>
</div>`
},
{
maxWidth: 200,
Expand Down

1 comment on commit 7799405

@vercel
Copy link

@vercel vercel bot commented on 7799405 Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

opub-www – ./apps/www

opub-www.vercel.app
opub-www-civicdatalab.vercel.app
opub-www-git-main-civicdatalab.vercel.app

Please sign in to comment.