From 681ebb88b17cdb2d1256b9d81be57dc3377e99e4 Mon Sep 17 00:00:00 2001 From: Rakuyo Date: Mon, 8 Jul 2024 20:55:38 +0800 Subject: [PATCH] feat: Add `SectionEdgeInsets.groupCard` --- .../Epoxy/CollectionView/Tools/SectionEdgeInsets.swift | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Sources/Epoxy/CollectionView/Tools/SectionEdgeInsets.swift b/Sources/Epoxy/CollectionView/Tools/SectionEdgeInsets.swift index 590aadd..2faec01 100644 --- a/Sources/Epoxy/CollectionView/Tools/SectionEdgeInsets.swift +++ b/Sources/Epoxy/CollectionView/Tools/SectionEdgeInsets.swift @@ -37,6 +37,11 @@ public enum SectionEdgeInsets { /// Custom spacing for all four sides. case all(top: CGFloat, leading: CGFloat, bottom: CGFloat, trailing: CGFloat) + /// Same spacing as `.insetGrouped` style `UITableView` + /// + /// (top: 0, leading: 20, bottom: 35, trailing: 20) + case groupCard + /// Fully customized using `EdgeInsets`. case custom(RAKCore.EdgeInsets) @@ -67,6 +72,9 @@ extension SectionEdgeInsets { case .all(let top, let leading, let bottom, let trailing): .init(top: top, leading: leading, bottom: bottom, trailing: trailing) + case .groupCard: + .init(top: 0, leading: 20, bottom: 35, trailing: 20) + case .custom(let edge): edge.directionalEdgeInsets }