-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathListRowView.swift
More file actions
63 lines (33 loc) · 926 Bytes
/
ListRowView.swift
File metadata and controls
63 lines (33 loc) · 926 Bytes
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
55
56
57
58
59
60
61
62
63
//
// ListRowView.swift
// Happy Tree
//
// Created by Thach Quynh Anh on 11/13/22.
//
import Foundation
import SwiftUI
struct ListRowView: View {
let item: ItemModel
var body: some View {
HStack (
alignment: .center,
spacing: 10){
Image(item.emoji)
.resizable()
.frame(width:40, height: 40)
.offset(x: 0)
Text(item.title)
.font(.system(size: 20))
}
}
}
struct MyView_Previews: PreviewProvider {
static var item1 = ItemModel(emoji: "smiling face", title: "Eat mint oreo ice cream")
static var item2 = ItemModel(emoji: "loudly crying face", title: "Lost earrings")
static var previews: some View {
Group {
ListRowView(item: item1)
ListRowView(item: item2)
}
}
}