Skip to content

Commit

Permalink
fix access control
Browse files Browse the repository at this point in the history
  • Loading branch information
jopolaz committed Jan 7, 2021
1 parent d452213 commit 938fd0f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
8 changes: 7 additions & 1 deletion Sources/YLOnBoarding/YLOnBoarding.swift
Expand Up @@ -10,9 +10,15 @@ import SwiftUI
public struct YLOnBoarding: View {

let title: String
var style: YLOnBoardingStyle = YLOnBoardingStyle()
let style: YLOnBoardingStyle
let items: [YLOnBoardingItem]

public init(title: String, style: YLOnBoardingStyle = YLOnBoardingStyle(), items: [YLOnBoardingItem]) {
self.title = title
self.style = style
self.items = items
}

public var body: some View {
VStack {
Text(title)
Expand Down
8 changes: 7 additions & 1 deletion Sources/YLOnBoarding/YLOnBoardingItem.swift
Expand Up @@ -10,7 +10,13 @@ import Foundation
public struct YLOnBoardingItem: Decodable {
let icon: String
let title: String
var description: String = ""
let description: String

public init(icon: String, title: String, description: String = "") {
self.icon = icon
self.title = title
self.description = description
}
}


Expand Down
9 changes: 7 additions & 2 deletions Sources/YLOnBoarding/YLOnBoardingStyle.swift
Expand Up @@ -8,6 +8,11 @@
import SwiftUI

public struct YLOnBoardingStyle {
var mainColor : Color = .black
var accentColor : Color = .blue
var mainColor: Color
var accentColor: Color

public init(mainColor: Color = .black, accentColor: Color = .blue) {
self.mainColor = mainColor
self.accentColor = accentColor
}
}

0 comments on commit 938fd0f

Please sign in to comment.