From 457c5439cc4745963df77de5f04a1b19d70accab Mon Sep 17 00:00:00 2001 From: paytondev <81662879+paytontech@users.noreply.github.com> Date: Mon, 31 Jul 2023 14:38:31 -0400 Subject: [PATCH] custom views --- Sources/ConfettiSwiftUI.swift | 5 ++++- Tests/LinuxMain.swift | 4 ---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Sources/ConfettiSwiftUI.swift b/Sources/ConfettiSwiftUI.swift index 0a27ef7..2284dd9 100644 --- a/Sources/ConfettiSwiftUI.swift +++ b/Sources/ConfettiSwiftUI.swift @@ -7,7 +7,7 @@ import SwiftUI -public enum ConfettiType:CaseIterable, Hashable { +public enum ConfettiType { public enum Shape { case circle @@ -21,6 +21,7 @@ public enum ConfettiType:CaseIterable, Hashable { case text(String) case sfSymbol(symbolName: String) case image(String) + case view(AnyView) public var view:AnyView{ switch self { @@ -38,6 +39,8 @@ public enum ConfettiType:CaseIterable, Hashable { return AnyView(Image(systemName: symbolName)) case .image(let image): return AnyView(Image(image).resizable()) + case .view(let view): + return view default: return AnyView(Circle()) } diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index 5df72c3..b8e8445 100644 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -1,7 +1,3 @@ import XCTest import ConfettiSwiftUITests - -var tests = [XCTestCaseEntry]() -tests += ConfettiSwiftUITests.allTests() -XCTMain(tests)