dudu-mastodon/duduji/Core/Components/NotificationRow.swift
Ching 8392e8a86e feat(View): 增加 NotificationView
增加 NotificationView

Signed-off-by: Ching <loooching@gmail.com>
2023-05-07 19:39:45 +08:00

71 lines
2.5 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// NotificationRow.swift
// duduji
//
// Created by ching on 2023/5/7.
//
import SwiftUI
struct NotificationRow: View {
var body: some View {
VStack {
HStack {
VStack {
ZStack(alignment: .topLeading) {
RoundedRectangle(cornerRadius: 6)
.fill(Color.blue)
.frame(width: 48, height: 48)
.overlay(
RoundedRectangle(cornerRadius: 6)
.stroke(.gray.opacity(0.5), lineWidth: 2)
)
ZStack(alignment: .center) {
Circle()
.strokeBorder(Color.white, lineWidth: 1)
.background(Circle().foregroundColor(Color.yellow))
.frame(width: 24, height: 24)
Image(systemName: "star.fill")
.resizable()
.scaledToFit()
.frame(width: 12, height: 12)
.foregroundColor(.white)
}
.offset(x: -8, y: -8)
}
Spacer()
}
VStack(alignment: .leading, spacing: 4) {
HStack(alignment: .center, spacing: 2) {
Text("科代")
.bold()
Text("星标")
.textContentType(.none)
.font(.subheadline)
Text("·")
Text("4分钟前")
.foregroundColor(.gray)
.font(.subheadline)
}
HStack {
Text("偶然刷到一个 INS视频帅帅的藏族模特走\n路,但配乐的一个蒙古歌,歌词还是汉语中文。\n 一群西方人在下面评论:多么美好的藏族文化啊!\n一时间不知道说啥。。。\n嗐,白人")
.multilineTextAlignment(.leading)
Spacer()
}
Spacer()
}
}
}
.padding(.horizontal)
Divider()
.padding(.vertical)
}
}
struct NotificationRow_Previews: PreviewProvider {
static var previews: some View {
NotificationRow()
}
}