diff --git a/examples/demo/App/Models/AppModels.swift b/examples/demo/App/Models/AppModels.swift index d98591df0..970fe27e0 100644 --- a/examples/demo/App/Models/AppModels.swift +++ b/examples/demo/App/Models/AppModels.swift @@ -52,10 +52,14 @@ enum NotificationType: String, CaseIterable, Identifiable { /// Sample in-app message layouts triggered by the iam_type trigger enum InAppMessageType: String, CaseIterable, Identifiable { - case topBanner = "Top Banner" - case bottomBanner = "Bottom Banner" - case centerModal = "Center Modal" - case fullScreen = "Full Screen" + case topBanner = "Top" + case bottomBanner = "Bottom" + case centerModal = "Center" + case html = "HTML" + case fullScreen = "Full" + case fullBleed = "Full Bleed" + case carousel = "Carousel" + case carouselBleed = "Carousel Bleed" var id: String { rawValue } @@ -65,7 +69,11 @@ enum InAppMessageType: String, CaseIterable, Identifiable { case .topBanner: return "top_banner" case .bottomBanner: return "bottom_banner" case .centerModal: return "center_modal" + case .html: return "html" case .fullScreen: return "full_screen" + case .fullBleed: return "full_bleed" + case .carousel: return "carousel" + case .carouselBleed: return "carousel_bleed" } } } diff --git a/examples/demo/App/Views/Components/ActionButton.swift b/examples/demo/App/Views/Components/ActionButton.swift index a5a301642..ca596bb0b 100644 --- a/examples/demo/App/Views/Components/ActionButton.swift +++ b/examples/demo/App/Views/Components/ActionButton.swift @@ -72,7 +72,9 @@ struct ActionButton: View { Text(title) .font(OS.Font.bodyMedium.weight(.semibold)) .lineLimit(1) + .minimumScaleFactor(0.7) } + .padding(.horizontal, 8) .frame(maxWidth: .infinity) .frame(height: OS.Layout.buttonHeight) .foregroundColor(foregroundColor) diff --git a/examples/demo/App/Views/Sections/SendIamSection.swift b/examples/demo/App/Views/Sections/SendIamSection.swift index 9fd851a6e..79a9c586c 100644 --- a/examples/demo/App/Views/Sections/SendIamSection.swift +++ b/examples/demo/App/Views/Sections/SendIamSection.swift @@ -31,18 +31,25 @@ import SwiftUI struct SendIamSection: View { @EnvironmentObject var viewModel: OneSignalViewModel + private let columns = Array( + repeating: GridItem(.flexible(), spacing: OS.Spacing.cardGap), + count: 2 + ) + var body: some View { SectionCard( title: "SEND IN-APP MESSAGE", sectionKey: "send_iam", onInfoTap: { viewModel.showTooltip(for: "sendInAppMessage") } ) { - ForEach(InAppMessageType.allCases) { type in - ActionButton( - type.rawValue.uppercased(), - accessibilityID: "send_iam_\(type.triggerValue)_button" - ) { - viewModel.sendIamTrigger(type) + LazyVGrid(columns: columns, spacing: OS.Spacing.cardGap) { + ForEach(InAppMessageType.allCases) { type in + ActionButton( + type.rawValue.uppercased(), + accessibilityID: "send_iam_\(type.triggerValue)_button" + ) { + viewModel.sendIamTrigger(type) + } } } }