Mercurial > public > geoquiz
view GeoQuiz/Helpers/SettingsRow.swift @ 33:6d574bd1644f
refactor controllers
author | Dennis C. M. <dennis@denniscm.com> |
---|---|
date | Sat, 12 Nov 2022 11:18:30 +0100 |
parents | eb23effeede7 |
children |
line wrap: on
line source
// // SettingsRow.swift // GeoQuiz // // Created by Dennis Concepción Martín on 7/10/22. // import SwiftUI struct SettingsRow: View { var color: Color var symbol: String var text: String var body: some View { HStack(alignment: .center, spacing: 20) { RoundedRectangle(cornerRadius: 5) .frame(width: 30, height: 30) .foregroundColor(color) .overlay( Image(systemName: symbol) .foregroundColor(.white) ) Text(text) .foregroundColor(.primary) } } } struct SettingsRow_Previews: PreviewProvider { static var previews: some View { SettingsRow( color: .mayaBlue, symbol: "info", text: "About" ) } }