another.im-ios/ConversationsClassic/View/Components/MessageContainer.swift
2024-06-24 15:28:26 +02:00

23 lines
586 B
Swift

import Foundation
import SwiftUI
struct MessageContainer: View {
let message: Message
let isOutgoing: Bool
var body: some View {
ZStack {
// bg
Color.Main.backgroundDark
.ignoresSafeArea()
// TODO: make custom body for different message types
// body
Text(message.body ?? "...")
.multilineTextAlignment(.leading)
.foregroundColor(Color.Main.black)
.background(isOutgoing ? Color.Material.greenDark200 : Color.Main.white)
}
}
}