-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEntryView.swift
33 lines (28 loc) · 1.16 KB
/
EntryView.swift
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
//
// EntryView.swift
// Foldable List
//
// Created by gwwo on 27/7/2022.
//
import SwiftUI
struct EntryView: View, Animatable {
var content: EntryContent?
var body: some View {
GeometryReader{ geometry in
HStack(alignment: .center, spacing:0) {
if let content = content {
Text("\(content.leading)").foregroundColor(.gray)
.font(.system(size: 11)).lineLimit(1)
.frame(minWidth: geometry.size.width * 0.08, alignment: .center)
Text(content.left).foregroundColor(.black)
.font(.system(size: 16)).fontWeight(.bold).minimumScaleFactor(0.7)
.frame(maxWidth:.infinity)
.padding(.horizontal,5)
Text(content.right).foregroundColor(.black)
.font(.system(size: 13)).minimumScaleFactor(0.8)
.frame(width: geometry.size.width * 0.5)
}
}.position(x: geometry.size.width / 2, y: geometry.size.height / 2)
}.padding(5)
}
}