// // 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() } }