Skip to content

Commit c147125

Browse files
committed
Public access
1 parent c1ca6c4 commit c147125

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

Sources/ElegantCalendar/Helpers/Models/CalendarConfiguration.swift

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import SwiftUI
44

55
public struct CalendarConfiguration: Equatable {
66

7-
let calendar: Calendar
8-
let startDate: Date
9-
let endDate: Date
10-
let themeColor: Color
7+
public let calendar: Calendar
8+
public let startDate: Date
9+
public let endDate: Date
10+
public let themeColor: Color
1111

12-
init(calendar: Calendar = .current, startDate: Date, endDate: Date, themeColor: Color) {
12+
public init(calendar: Calendar = .current, startDate: Date, endDate: Date, themeColor: Color) {
1313
self.calendar = calendar
1414
self.startDate = startDate
1515
self.endDate = endDate

Sources/ElegantCalendar/Helpers/Models/ObservableObjects/ElegantCalendarManager.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class ElegantCalendarManager: ObservableObject {
6161

6262
private var anyCancellable = Set<AnyCancellable>()
6363

64-
init(configuration: CalendarConfiguration, initialMonth: Date? = nil) {
64+
public init(configuration: CalendarConfiguration, initialMonth: Date? = nil) {
6565
self.configuration = configuration
6666

6767
yearlyManager = YearlyCalendarManager(configuration: configuration,

Sources/ElegantCalendar/Views/ElegantCalendarView.swift

+7-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
import ElegantPages
44
import SwiftUI
55

6-
struct ElegantCalendarView: View {
6+
public struct ElegantCalendarView: View {
77

8-
@ObservedObject var calendarManager: ElegantCalendarManager
8+
@ObservedObject public var calendarManager: ElegantCalendarManager
99

10-
var body: some View {
10+
public init(calendarManager: ElegantCalendarManager) {
11+
self.calendarManager = calendarManager
12+
}
13+
14+
public var body: some View {
1115
ElegantHPages(manager: calendarManager.pagerManager) {
1216
yearlyCalendarView
1317
monthlyCalendarView

0 commit comments

Comments
 (0)