Skip to content

Commit 52cf68d

Browse files
authored
Feat: updated options and fixed overflow
1 parent 8254b6f commit 52cf68d

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Projects/Realtime Currency Converter/script.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ const btn = document.querySelector("#btn");
88
const status = document.querySelector("#status");
99

1010
// append the curreny codes list to the list and select defaults
11-
currency_list.forEach((code) => {
11+
currency_list.forEach((currency) => {
12+
const code = currency[0];
13+
const countryName = currency[1];
14+
1215
const newElement = document.createElement("option");
1316
newElement.value = code;
14-
newElement.textContent = code;
17+
newElement.textContent = `${code} - ${countryName}`;
1518

1619
if (code === "USD")
1720
newElement.selected = true;

Projects/Realtime Currency Converter/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ body {
4747
.selecterContainer select {
4848
padding: 2px;
4949
border-radius: 4px;
50+
max-width:40%;
5051
outline: transparent;
5152
}
5253
#switchCurrency {

0 commit comments

Comments
 (0)