Skip to content
This repository was archived by the owner on Dec 27, 2020. It is now read-only.

Commit 6548e52

Browse files
authored
removing private state (#73)
1 parent 512de56 commit 6548e52

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

Sources/Grid/Grid.swift

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
import SwiftUI
22

3-
struct GridItem: Identifiable {
4-
let view: AnyView
5-
let id: AnyHashable
6-
}
7-
83
/// A view that arranges its children in a grid.
94
public struct Grid<Content>: View where Content: View {
105
@Environment(\.gridStyle) private var style
6+
@State var itemsPreferences: [AnyHashable : GridItemPreferences] = [:]
117
let items: [GridItem]
12-
@State private var itemsPreferences: [AnyHashable : GridItemPreferences] = [:]
138

149
public var body: some View {
1510
GeometryReader { geometry in

Sources/Grid/GridItem.swift

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import SwiftUI
2+
3+
struct GridItem: Identifiable {
4+
let view: AnyView
5+
let id: AnyHashable
6+
}

0 commit comments

Comments
 (0)