Skip to content

Commit

Permalink
Merge pull request #59 from 5afe/add-image-alignment
Browse files Browse the repository at this point in the history
Added image alignment
  • Loading branch information
SvenTiigi authored Aug 30, 2022
2 parents cd69ff8 + 17f1eaa commit 50a121a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/Models/WhatsNew+Layout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public extension WhatsNew {

/// The feature horizontal spacing
public var featureHorizontalSpacing: CGFloat

/// The feature horizontal alignment
public var featureHorizontalAlignment: VerticalAlignment

/// The feature vertical spacing
public var featureVerticalSpacing: CGFloat
Expand Down Expand Up @@ -70,6 +73,7 @@ public extension WhatsNew {
featureListPadding: EdgeInsets = .init(top: 0, leading: 15, bottom: 0, trailing: 0),
featureImageWidth: CGFloat = 40,
featureHorizontalSpacing: CGFloat = 15,
featureHorizontalAlignment: VerticalAlignment = .center,
featureVerticalSpacing: CGFloat = 2,
footerActionSpacing: CGFloat = 15,
footerPrimaryActionButtonCornerRadius: CGFloat = 14,
Expand All @@ -83,6 +87,7 @@ public extension WhatsNew {
self.featureListPadding = featureListPadding
self.featureImageWidth = featureImageWidth
self.featureHorizontalSpacing = featureHorizontalSpacing
self.featureHorizontalAlignment = featureHorizontalAlignment
self.featureVerticalSpacing = featureVerticalSpacing
self.footerActionSpacing = footerActionSpacing
self.footerPrimaryActionButtonCornerRadius = footerPrimaryActionButtonCornerRadius
Expand Down
1 change: 1 addition & 0 deletions Sources/View/WhatsNewView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ private extension WhatsNewView {
_ feature: WhatsNew.Feature
) -> some View {
HStack(
alignment: self.layout.featureHorizontalAlignment,
spacing: self.layout.featureHorizontalSpacing
) {
feature
Expand Down

0 comments on commit 50a121a

Please sign in to comment.