mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-11-16 14:01:04 +01:00
Add SwiftUI + Redux
This commit is contained in:
1 parent
5b758db8cd
commit
f385cd4929
29 files changed
+1311
No files matched your search
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// UserRw.swift
|
||||
// SwiftUIDemo
|
||||
//
|
||||
// Created by Thomas Ricouard on 04/06/2019.
|
||||
// Copyright © 2019 Thomas Ricouarf. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct UserRow : View {
|
||||
let user: User
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
HStack {
|
||||
Image(systemName: user.imageName)
|
||||
|
||||
VStack {
|
||||
Text(user.name)
|
||||
Text(user.username)
|
||||
.color(.secondary)
|
||||
.lineLimit(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
struct UserRw_Previews : PreviewProvider {
|
||||
static var previews: some View {
|
||||
UserRow(user: sampleData[0])
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user