From 87b6dd45958889e4907170df5732c05acc3034f7 Mon Sep 17 00:00:00 2001 From: eloicasamayor <37459666+eloicasamayor@users.noreply.github.com> Date: Mon, 18 Nov 2024 21:49:19 +0100 Subject: [PATCH] una mica de layout --- src/App.css | 19 +++++++++++++++++++ src/App.tsx | 30 +++++++++++++++++------------- src/assets/world.jsx | 2 +- 3 files changed, 37 insertions(+), 14 deletions(-) diff --git a/src/App.css b/src/App.css index c9c94fd..c31da8b 100644 --- a/src/App.css +++ b/src/App.css @@ -1,7 +1,26 @@ +#root { + display: flex; + flex-direction: column; +} + #world { width: "100%"; } +#country-info { + display: flex; +} + +.country-flag { + width: 8rem; +} + .map { width: "100%"; } + +@media (min-width: 1250px) { + #root { + flex-direction: row; + } +} diff --git a/src/App.tsx b/src/App.tsx index 11b0b82..131a6a5 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -65,19 +65,23 @@ function App() { <> {countryInfo && ( -
-

{country}

-

- Official name: {countryInfo.name.official} -

-

- Capital: {countryInfo?.capital} -

-

- Languages:{" "} - {Object.values(countryInfo?.languages).map((l) => l + ", ")} -

- +
+
+

{country}

{" "} + +
+
+

+ Official name: {countryInfo.name.official} +

+

+ Capital: {countryInfo?.capital} +

+

+ Languages:{" "} + {Object.values(countryInfo?.languages).map((l) => l + ", ")} +

+
)} diff --git a/src/assets/world.jsx b/src/assets/world.jsx index 15c8804..6da6e83 100644 --- a/src/assets/world.jsx +++ b/src/assets/world.jsx @@ -6,7 +6,7 @@ export function Map() { className="map" xmlns="http://www.w3.org/2000/svg" width="100%" - viewBox="0 0 1000 1000" + viewBox="0 0 1050 650" >