Skip to content

Commit

Permalink
Merge pull request #827 from CodeForAfrica/bugfix/map_tooltip
Browse files Browse the repository at this point in the history
Fix tooltip style
  • Loading branch information
koechkevin authored Aug 9, 2024
2 parents a07f44c + df5f38e commit ecaef69
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
8 changes: 4 additions & 4 deletions packages/hurumap-core/src/Location/Location.snap.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ exports[`Location renders unchanged 1`] = `
>
Country
</h6>
<span
<div
class="css-k6p9om"
>
Kenya
</span>
</div>
</div>
</div>
<div
Expand All @@ -39,11 +39,11 @@ exports[`Location renders unchanged 1`] = `
>
County
</h6>
<span
<div
class="css-k6p9om"
>
Isiolo
</span>
</div>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/hurumap-core/src/LocationTag/LocationTag.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const LevelTypography = styled("h6", {
};
});

const NameTypography = styled("span")(({ theme }) => {
const NameTypography = styled("div")(({ theme }) => {
return {
fontSize: theme.typography.pxToRem(9),
fontWeight: "bold",
Expand Down
4 changes: 2 additions & 2 deletions packages/hurumap-core/src/LocationTag/LocationTag.snap.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ exports[`LocationTag renders unchanged 1`] = `
>
region
</h6>
<span
<div
class="css-k6p9om"
>
Region
</span>
</div>
</div>
</div>
`;
13 changes: 13 additions & 0 deletions packages/hurumap-next/src/Map/Layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,19 @@ function Layers({
top: 0,
...PopUpLocationTagProps?.sx,
}}
NameTypographyProps={{
style: {
minWidth: 60,
textAlign: "center",
},
}}
LevelTypographyProps={{
style: {
top: -12,
left: "50%",
transform: "translateX(-50%)",
},
}}
/>
</ThemeProvider>
</StyledEngineProvider>,
Expand Down

0 comments on commit ecaef69

Please sign in to comment.