Skip to content

Commit

Permalink
fix(#206): new padding for text elements in onboarding UI
Browse files Browse the repository at this point in the history
  • Loading branch information
SMartorelli committed Feb 17, 2024
1 parent e0cce1d commit 10e8e09
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Notification Agent Onboarding/Views/PageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,22 @@ struct PageView: View {
.padding(.bottom, 4)
.accessibilityAddTraits(.isHeader)
.accessibilityIdentifier("onboarding_title")
.padding(.horizontal, 30)
}
if #available(macOS 12, *) {
if let subtitle = viewModel.page.subtitle {
Text(AttributedString(markdownText(subtitle).attributedString()))
.multilineTextAlignment(.center)
.accessibilityAddTraits(.isHeader)
.accessibilityIdentifier("onboarding_subtitle")
.padding(.horizontal, 30)
}
if let body = viewModel.page.body {
Text(AttributedString(markdownText(body).attributedString()))
.multilineTextAlignment(.leading)
.padding(.top, 8)
.accessibilityIdentifier("onboarding_body")
.padding(.horizontal, 30)
}
} else {
if let subtitle = viewModel.page.subtitle {
Expand All @@ -78,13 +81,15 @@ struct PageView: View {
.font(.title2)
.accessibilityAddTraits(.isHeader)
.accessibilityIdentifier("onboarding_subtitle")
.padding(.horizontal, 30)
}
if let body = viewModel.page.body {
Text(body)
.font(.body)
.multilineTextAlignment(.center)
.padding(.top, 8)
.accessibilityIdentifier("onboarding_body")
.padding(.horizontal, 30)
}
}

Expand Down

0 comments on commit 10e8e09

Please sign in to comment.