mirror of
https://github.com/ivanvorobei/SwiftUI.git
synced 2026-04-17 14:29:54 +02:00
Add projects
This commit is contained in:
31
Examples/UINote/SwiftUINote/Views/NoteRow.swift
Executable file
31
Examples/UINote/SwiftUINote/Views/NoteRow.swift
Executable file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// NoteRow.swift
|
||||
// SwiftUINote
|
||||
//
|
||||
// Created by chanju Jeon on 05/06/2019.
|
||||
// Copyright © 2019 we'd. All rights reserved.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct NoteRow : View {
|
||||
var note: Note
|
||||
|
||||
var body: some View {
|
||||
HStack {
|
||||
Text(note.text)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
struct NoteRow_Previews : PreviewProvider {
|
||||
static var previews: some View {
|
||||
Group {
|
||||
NoteRow(note: Note(text: "New Note"))
|
||||
NoteRow(note: Note(text: "Another Note"))
|
||||
}
|
||||
.previewLayout(.fixed(width: 300, height: 50))
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user