diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-04-26 18:20:34 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-04-26 18:20:34 +0200 |
| commit | bf2790fca182f504255df877beff0ac0334cb2ca (patch) | |
| tree | f7be6c0a2b2d7f3f5c172277a4de6403588dc9c5 /Sources/Patterns/Tile.swift | |
| parent | 68ce43557c7bb7bffc33e3c3f161d3a93f89e200 (diff) | |
Add explicit initializers
Diffstat (limited to 'Sources/Patterns/Tile.swift')
| -rw-r--r-- | Sources/Patterns/Tile.swift | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Sources/Patterns/Tile.swift b/Sources/Patterns/Tile.swift index 816ebc5..9c39640 100644 --- a/Sources/Patterns/Tile.swift +++ b/Sources/Patterns/Tile.swift @@ -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 |