Mercurial > public > geoquiz
diff GeoQuiz/Components/AnswerButtonHelper.swift @ 19:f140bb277c96
refactor code
author | Dennis C. M. <dennis@denniscm.com> |
---|---|
date | Sun, 23 Oct 2022 00:11:38 +0100 |
parents | a793f33f05fb |
children |
line wrap: on
line diff
--- a/GeoQuiz/Components/AnswerButtonHelper.swift Sat Oct 22 08:56:54 2022 +0100 +++ b/GeoQuiz/Components/AnswerButtonHelper.swift Sun Oct 23 00:11:38 2022 +0100 @@ -8,14 +8,14 @@ import SwiftUI struct AnswerButton: View { - let optionName: String + let name: String let color: Color var body: some View { RoundedRectangle(cornerRadius: 15) .foregroundColor(.white) .overlay( - Text(optionName) + Text(name) .font(.title2.bold()) .foregroundColor(color) ) @@ -30,7 +30,7 @@ VStack { Spacer() - AnswerButton(optionName: "Madrid", color: .royalLightBlue) + AnswerButton(name: "Madrid", color: .royalLightBlue) .frame(height: 70) } .padding()