-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGitHubBannerView.swift
More file actions
54 lines (47 loc) · 1.47 KB
/
GitHubBannerView.swift
File metadata and controls
54 lines (47 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//
// GitHubSocialPreview.swift
// SwiftUICardStack-Example
//
// Created by Peter Larson on 5/30/21.
//
import SwiftUI
import SwiftUICardStack
// 1280×640
struct GitHubBannerView: View {
var body: some View {
ZStack {
VStack {
VStack {
Text("🗂SwiftUIStackView")
.font(.system(size: 48, weight: .regular, design: .default))
Text("A interactive way to peek and sort through a collection")
.font(.system(size: 20, weight: .semibold, design: .rounded))
}
CardStack(
// Data
items: mock,
// Triggered when User gestures a detail inspection of a item.
selection: .constant(nil),
// View representation for Data.
builder: CardView.init(model:)
)
.frame(width: 400)
.redacted(reason: .placeholder)
}
HStack {
Spacer()
VStack {
Spacer()
Text("@p-larson")
}
}
.padding()
}
}
}
public struct GitHubBanner_Previews: PreviewProvider {
public static var previews: some View {
GitHubBannerView()
.previewLayout(.fixed(width: 1280, height: 640))
}
}