Skip to content

Commit b61a850

Browse files
authored
Merge pull request #110 from OCA-UFCG/chore/popup-menu
Update popup layout design
2 parents 29fa10a + b122de0 commit b61a850

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

src/app/globalStyles.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export const GlobalStyles = createGlobalStyle`
192192
}
193193
194194
.maplibregl-popup-content {
195-
width: 20rem;
195+
width: 13rem;
196196
}
197197
198198
.maplibregl-popup-tip {

src/components/MapPopup/MapPopup.styles.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,12 @@ export const LineInfo = styled.div`
4444
export const TotalArea = styled.h3`
4545
font-size: 0.75rem;
4646
font-weight: normal;
47+
max-width: 70%;
4748
`;
4849

4950
export const PercentArea = styled.h3`
5051
font-size: 1rem;
5152
font-weight: bold;
52-
text-align: right;
53-
margin-left: auto;
5453
`;
5554

5655
export const Color = styled.div<{ color: string; $percent: number }>`

src/components/MapPopup/MapPopup.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ const MapPopup: React.FC<MapPopupProps> = ({
4646
<InfoContent>
4747
{areas.map((areaInfo: AreaInfo, index) => (
4848
<LineInfo key={index}>
49-
<Color color={areaInfo.color} $percent={areaInfo.percent} />
50-
<TotalArea>({areaInfo.area})</TotalArea>
51-
<PercentArea>{areaInfo.percent}%</PercentArea>
49+
<Color color={areaInfo.color} $percent={areaInfo.percent || 45} />
50+
{areaInfo.percent && <PercentArea>{areaInfo.percent}%</PercentArea>}
51+
<TotalArea>{areaInfo.area}</TotalArea>
5252
</LineInfo>
5353
))}
5454
</InfoContent>

src/utils/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const sections: ISections = {
3131
path: "/#about",
3232
},
3333
maps: {
34-
name: "Mapas & Visualizações",
34+
name: "Plataforma do OCA",
3535
path: "/#maps-visu",
3636
},
3737
publications: {
@@ -65,7 +65,7 @@ export const sections: ISections = {
6565
},
6666
},
6767
},
68-
map: { name: "Mapa", path: "/map" },
68+
map: { name: "Plataforma", path: "/map" },
6969
contact: { name: "Fale conosco", path: "/contact-us" },
7070
};
7171

0 commit comments

Comments
 (0)