From 76683a73762201168be0fe3b7d80e248947f3751 Mon Sep 17 00:00:00 2001 From: Romain Vincens Date: Tue, 3 Dec 2024 09:20:29 +0100 Subject: [PATCH] Fixed weekdays customization --- Sources/Public/View Protocols/Public+WeekdaysView.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Sources/Public/View Protocols/Public+WeekdaysView.swift b/Sources/Public/View Protocols/Public+WeekdaysView.swift index 81b3f59..0ff1661 100644 --- a/Sources/Public/View Protocols/Public+WeekdaysView.swift +++ b/Sources/Public/View Protocols/Public+WeekdaysView.swift @@ -13,15 +13,16 @@ import SwiftUI public protocol WeekdaysView: View { // MARK: View Customisation func createContent() -> AnyView - func createWeekdayLabel(_ weekday: MWeekday) -> AnyWeekdayLabel + func createWeekdayLabel(_ weekday: MWeekday) -> AnyView } // MARK: - Default View Implementation public extension WeekdaysView { - func createContent() -> AnyView { createWeekdaysView().erased() } - func createWeekdayLabel(_ weekday: MWeekday) -> AnyWeekdayLabel { createDefaultWeekDayLabel(weekday).erased() } + func createContent() -> AnyView { createDefaultContent().erased() } + func createWeekdayLabel(_ weekday: MWeekday) -> AnyView { createDefaultWeekDayLabel(weekday).erased() } } private extension WeekdaysView { + func createDefaultContent() -> some View { createWeekdaysView().erased() } func createDefaultWeekDayLabel(_ weekday: MWeekday) -> DefaultWeekdayLabel { DefaultWeekdayLabel(weekday: weekday) } }