Skip to content

Commit

Permalink
fix comments & indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vuinguyen committed Mar 31, 2022
1 parent 50beaf0 commit 3851c10
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions TipperSwiftUI/Views/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ struct ContentView: View {
.font(.title2)
Text("Tip Percent")
.primaryStyle()
Picker("What is your favorite color?", selection: $selectedTipPercentage) {
Picker("Select Tip Percentage", selection: $selectedTipPercentage) {
ForEach(TipPercent.allCases) { percent in
Text(percent.description)
}
Expand All @@ -37,15 +37,20 @@ struct ContentView: View {
Spacer()
.frame(height: 30)
VStack {

CalculatedAmountView(amountLabel: "Tip Amount", amount: viewModel.getTipAmountStringFormatted(tipPercent: selectedTipPercentage, billAmount: billAmount))

CalculatedAmountView(amountLabel: "Tip Amount",
amount: viewModel.getTipAmountStringFormatted(tipPercent:
selectedTipPercentage,
billAmount:
billAmount))

Divider()
.padding(.horizontal)

// for bill total, make font = .title2, and fontWeight = .bold
// for tip amount, make font = .subheadline, and fontWeight = .regular
CalculatedAmountView(amountLabel: "Bill Total", amount: viewModel.getBillTotalStringFormatted(tipPercent: selectedTipPercentage, billAmount: billAmount))

CalculatedAmountView(amountLabel: "Bill Total",
amount: viewModel.getBillTotalStringFormatted(tipPercent:
selectedTipPercentage,
billAmount:
billAmount))
}
// Color in hex #E4ECFA
.background(Color(red: 0.8941176470588236, green: 0.9254901960784314, blue: 0.9803921568627451))
Expand Down

0 comments on commit 3851c10

Please sign in to comment.