Mercurial > public > simoleon
comparison Simoleon/UI/CurrencyList.swift @ 167:1940db1ef321
Minor changes
author | Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com> |
---|---|
date | Sat, 11 Sep 2021 16:30:40 +0200 |
parents | 3913aff613e8 |
children |
comparison
equal
deleted
inserted
replaced
166:e4cbb1eea394 | 167:1940db1ef321 |
---|---|
26 | 26 |
27 var body: some View { | 27 var body: some View { |
28 NavigationView { | 28 NavigationView { |
29 List { | 29 List { |
30 SearchBar(placeholder: "Search...", text: $searchCurrency) | 30 SearchBar(placeholder: "Search...", text: $searchCurrency) |
31 .padding(.vertical) | 31 .padding(.vertical, 4) |
32 .accessibilityIdentifier("CurrencySearchBar") | 32 .accessibilityIdentifier("CurrencySearchBar") |
33 | 33 |
34 ForEach(searchResults, id: \.self) { symbol in | 34 ForEach(searchResults, id: \.self) { symbol in |
35 Button(action: { | 35 Button(action: { |
36 if selection == .baseSymbol { | 36 if selection == .baseSymbol { |
41 | 41 |
42 presentation.wrappedValue.dismiss() | 42 presentation.wrappedValue.dismiss() |
43 }) { | 43 }) { |
44 let currency = currencyDetails[symbol]! | 44 let currency = currencyDetails[symbol]! |
45 CurrencyRow(currency: currency) | 45 CurrencyRow(currency: currency) |
46 .padding(.vertical, 4) | |
46 } | 47 } |
47 } | 48 } |
48 } | 49 } |
49 .listStyle() | 50 .listStyle() |
50 .navigationTitle("Currencies") | 51 .navigationTitle("Currencies") |