]> git.r.bdr.sh - rbdr/patterns/blobdiff - Sources/Patterns/Tile.swift
Add explicit initializers
[rbdr/patterns] / Sources / Patterns / Tile.swift
index 816ebc5a87926eef37f4dfaa89b5f6da4cd8546a..9c39640b8ab4dbfdae2ab29988ac9851a8310079 100644 (file)
@@ -11,6 +11,13 @@ public struct Tile: View {
     design.pixels()
   }
   
+  public init(design: TileDesign, pixelSize: CGFloat = 2.0, foregroundColor: Color = .black, backgroundColor: Color = .white) {
+    self.design = design
+    self.pixelSize = pixelSize
+    self.foregroundColor = foregroundColor
+    self.backgroundColor = backgroundColor
+  }
+  
     public var body: some View {
       VStack(spacing: 0) {
         ForEach(0 ..< 8) { i in