Skip to content

Commit

Permalink
💄 (GEK): Update choices sizes and spacing to fit
Browse files Browse the repository at this point in the history
  • Loading branch information
HPezz committed Nov 9, 2023
1 parent 83ed836 commit 4c732fe
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extension ObserveThenTouchToSelectView {
@ObservedObject var viewModel: SelectionViewViewModel
let isTappable: Bool

private let kAnswerSize: CGFloat = 300
private let kAnswerSize: CGFloat = 180

var body: some View {
let choice = viewModel.choices[0]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ extension ObserveThenTouchToSelectView {
@ObservedObject var viewModel: SelectionViewViewModel
let isTappable: Bool

private let kHorizontalSpacing: CGFloat = 150
private let kAnswerSize: CGFloat = 300
private let kHorizontalSpacing: CGFloat = 60
private let kAnswerSize: CGFloat = 180

var body: some View {
HStack(spacing: kHorizontalSpacing) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,25 @@ extension ObserveThenTouchToSelectView {
@ObservedObject var viewModel: SelectionViewViewModel
let isTappable: Bool

private let kHorizontalSpacing: CGFloat = 30
private let kAnswerSize: CGFloat = 280
private let kHorizontalSpacing: CGFloat = 60
private let kVerticalSpacing: CGFloat = 40
private let kAnswerSize: CGFloat = 180

var body: some View {
HStack(spacing: kHorizontalSpacing) {
ForEach(viewModel.choices[0...2]) { choice in
SelectionChoiceView(choice: choice, size: kAnswerSize, isTappable: isTappable)
.onTapGesture {
viewModel.onChoiceTapped(choice: choice)
}
VStack(spacing: kVerticalSpacing) {
HStack(spacing: kHorizontalSpacing) {
ForEach(viewModel.choices[0...1]) { choice in
SelectionChoiceView(choice: choice, size: kAnswerSize, isTappable: isTappable)
.onTapGesture {
viewModel.onChoiceTapped(choice: choice)
}
}
}

SelectionChoiceView(choice: viewModel.choices[2], size: kAnswerSize, isTappable: isTappable)
.onTapGesture {
viewModel.onChoiceTapped(choice: viewModel.choices[2])
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ extension ObserveThenTouchToSelectView {
@ObservedObject var viewModel: SelectionViewViewModel
let isTappable: Bool

private let kHorizontalSpacing: CGFloat = 200
private let kHorizontalSpacing: CGFloat = 60
private let kVerticalSpacing: CGFloat = 40
private let kAnswerSize: CGFloat = 240
private let kAnswerSize: CGFloat = 180

var body: some View {
VStack(spacing: kVerticalSpacing) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ extension ObserveThenTouchToSelectView {
@ObservedObject var viewModel: SelectionViewViewModel
let isTappable: Bool

private let kHorizontalSpacing: CGFloat = 60
private let kHorizontalSpacing: CGFloat = 40
private let kVerticalSpacing: CGFloat = 40
private let kAnswerSize: CGFloat = 240
private let kAnswerSize: CGFloat = 140

var body: some View {
VStack(spacing: kVerticalSpacing) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ extension ObserveThenTouchToSelectView {
@ObservedObject var viewModel: SelectionViewViewModel
let isTappable: Bool

private let kHorizontalSpacing: CGFloat = 60
private let kHorizontalSpacing: CGFloat = 40
private let kVerticalSpacing: CGFloat = 40
private let kAnswerSize: CGFloat = 240
private let kAnswerSize: CGFloat = 140

var body: some View {
VStack(spacing: kVerticalSpacing) {
Expand Down

0 comments on commit 4c732fe

Please sign in to comment.