Skip to content

Commit

Permalink
[GOVAPPUK-1055]-Remove adaptive stack (#226)
Browse files Browse the repository at this point in the history
replace adaptive stack
  • Loading branch information
raphaelolu authored Jan 13, 2025
1 parent 46106d7 commit 048faa0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ struct AnalyticsConsentContainerView: View {
Divider()
.foregroundColor(Color(UIColor.govUK.strokes.listDivider))
.ignoresSafeArea()
AdaptiveStack {
let buttonLayout = verticalSizeClass == .compact ?
AnyLayout(HStackLayout()) :
AnyLayout(VStackLayout())
buttonLayout {
SwiftUIButton(
.primary,
viewModel: viewModel.allowButtonViewModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ struct AppRecommendUpdateContainerView: View {
Divider()
.foregroundColor(Color(UIColor.govUK.strokes.listDivider))
.ignoresSafeArea()
AdaptiveStack {
let buttonLayout = verticalSizeClass == .compact ?
AnyLayout(HStackLayout()) :
AnyLayout(VStackLayout())
buttonLayout {
SwiftUIButton(
.primary,
viewModel: viewModel.updateButtonViewModel
Expand Down
5 changes: 4 additions & 1 deletion Production/govuk_ios/SwiftUIViews/TopicsButtonView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ struct TopicsButtonView: View {
.background(Color(UIColor.govUK.strokes.listDivider))
.ignoresSafeArea(edges: [.leading, .trailing])
.padding([.top], 0)
AdaptiveStack {
let buttonLayout = verticalSizeClass == .compact ?
AnyLayout(HStackLayout()) :
AnyLayout(VStackLayout())
buttonLayout {
SwiftUIButton(
.primary,
viewModel: viewModel.primaryButtonViewModel
Expand Down

0 comments on commit 048faa0

Please sign in to comment.