@@ -18,10 +18,9 @@ struct TopCoinListView: View {
1818 . foregroundStyle ( . iCoAccent)
1919
2020 Text ( " 주목할 만한 코인 TOP5 " )
21+ . foregroundStyle ( . iCoLabel)
2122 }
2223 . font ( . ico18B)
23- . padding ( . horizontal, 22 )
24- . padding ( . top, 20 )
2524
2625 SegmentedControlView (
2726 selection: Binding (
@@ -35,14 +34,16 @@ struct TopCoinListView: View {
3534 tabTitles: TopCoinListViewModel . SegmentType. allCases. map { $0. rawValue } ,
3635 width: . infinity
3736 )
38- . padding ( . horizontal)
37+ . padding ( . horizontal, - 4 )
38+ . padding ( . bottom, 4 )
3939
4040 if viewModel. isLoading {
4141 DefaultProgressView ( status: . loading, message: " 시세 불러오는중 " )
4242 } else {
4343 TopCoinListSection ( viewModel: viewModel)
4444 }
4545 }
46+ . padding ( 22 )
4647 . background ( . iCoBackground)
4748 . clipShape ( RoundedRectangle ( cornerRadius: 20 ) )
4849 . overlay (
@@ -95,10 +96,10 @@ struct TopCoinListSection: View {
9596 } label: {
9697 HStack {
9798 Text ( " \( index + 1 ) " )
98- . font ( . ico16B )
99+ . font ( . ico15B )
99100 . foregroundColor ( . iCoAccent)
100101 . padding ( . trailing, 16 )
101-
102+
102103 CachedAsyncImage ( resource: . symbol( coin. coinSymbol) ) {
103104 Text ( String ( coin. coinSymbol. prefix ( 1 ) ) )
104105 . font ( . ico17Sb)
@@ -115,7 +116,9 @@ struct TopCoinListSection: View {
115116
116117 VStack ( alignment: . leading, spacing: 8 ) {
117118 Text ( viewModel. koreanName ( for: coin. id) )
118- . font ( . ico17)
119+ . font ( . ico15Sb)
120+ . lineLimit ( 1 )
121+ . foregroundStyle ( . iCoLabel)
119122 if viewModel. selectedSegment == . volume {
120123 Text ( coin. formatedVolume)
121124 . font ( . ico14)
@@ -129,6 +132,7 @@ struct TopCoinListSection: View {
129132 )
130133 }
131134 }
135+ . padding ( . trailing, 8 )
132136
133137 Spacer ( )
134138
@@ -137,21 +141,24 @@ struct TopCoinListSection: View {
137141 values: values,
138142 lineColor: coin. change == . fall ? . iCoNegative : . iCoPositive
139143 )
140- . frame ( width: 100 , height: 40 )
144+ . frame ( width: 80 , height: 40 )
141145 } else {
142146 ProgressView ( )
143- . frame ( width: 100 , height: 40 )
147+ . frame ( width: 80 , height: 40 )
144148 }
145149 }
146- . padding ( . vertical, 16 )
147- . padding ( . horizontal, 22 )
150+ . padding ( . bottom, index != viewModel. topCoins. count - 1 ? 14 : 0 )
148151 }
149152 . buttonStyle ( . plain)
150153 }
151154 }
155+ . padding ( . vertical, 4 )
152156 }
153157}
154158
155159#Preview {
156160 TopCoinListView ( )
161+ . environmentObject ( ThemeManager ( ) )
162+ . environment ( CoinStore ( coinService: DefaultCoinService ( network: NetworkClient ( ) ) ) )
163+ . padding ( )
157164}
0 commit comments