From: Ruben Beltran del Rio Date: Wed, 26 Apr 2023 15:18:09 +0000 (+0200) Subject: Make the properties public X-Git-Tag: 1.0.0~3 X-Git-Url: https://git.r.bdr.sh/rbdr/patterns/commitdiff_plain/cd8a7cf4a8dd77e11184202f6b67161383942652?hp=1418fe49617f5d35b14b19fe0ead15fcc43526c8 Make the properties public --- diff --git a/Sources/Patterns/Pattern.swift b/Sources/Patterns/Pattern.swift index 4fbc528..6c63870 100644 --- a/Sources/Patterns/Pattern.swift +++ b/Sources/Patterns/Pattern.swift @@ -1,16 +1,16 @@ import SwiftUI public struct Pattern: View { + + @Binding public var design: TileDesign; + public var pixelSize: CGFloat = 2.0; + public var foregroundColor: Color = .black + public var backgroundColor: Color = .white private var patternSize: CGFloat { pixelSize * 8.0; } - @Binding var design: TileDesign; - var pixelSize: CGFloat = 2.0; - var foregroundColor: Color = .black - var backgroundColor: Color = .white - public var body: some View { GeometryReader { gr in VStack(spacing: 0) { diff --git a/Sources/Patterns/PatternPicker.swift b/Sources/Patterns/PatternPicker.swift index 1f7d17b..3f550e5 100644 --- a/Sources/Patterns/PatternPicker.swift +++ b/Sources/Patterns/PatternPicker.swift @@ -2,12 +2,12 @@ import SwiftUI public struct PatternPicker: View { - @Binding var selectedDesign: TileDesign; + @Binding public var selectedDesign: TileDesign; - var selectedColor: Color = .accentColor - var pixelSize: CGFloat = 2.0; - var foregroundColor: Color = .black - var backgroundColor: Color = .white + public var selectedColor: Color = .accentColor + public var pixelSize: CGFloat = 2.0; + public var foregroundColor: Color = .black + public var backgroundColor: Color = .white let patterns = TileDesign.allCases diff --git a/Sources/Patterns/Tile.swift b/Sources/Patterns/Tile.swift index 3893324..816ebc5 100644 --- a/Sources/Patterns/Tile.swift +++ b/Sources/Patterns/Tile.swift @@ -2,10 +2,10 @@ import SwiftUI public struct Tile: View { - let design: TileDesign - var pixelSize: CGFloat = 2.0; - var foregroundColor: Color = .black - var backgroundColor: Color = .white + public let design: TileDesign + public var pixelSize: CGFloat = 2.0; + public var foregroundColor: Color = .black + public var backgroundColor: Color = .white private var pixels: [Int] { design.pixels()