mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-03-27 20:01:19 +01:00
Update
This commit is contained in:
36
Other Projects/SwiftUI + Redux/SwiftUIDemo/views/users/rows/UserRow.swift
Executable file
36
Other Projects/SwiftUI + Redux/SwiftUIDemo/views/users/rows/UserRow.swift
Executable file
@@ -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