blob: 373c2a6cdbe909065547eec561ad9bf10b0b722d (
plain)
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
|
import SwiftUI
struct ServerMessageView: View {
let message: String
var body: some View {
HStack(alignment: .center, spacing: 8) {
Image(systemName: "exclamationmark.triangle.fill")
.symbolRenderingMode(.multicolor)
.resizable()
.scaledToFit()
.frame(width: 16, height: 16)
Text("**\(message)**")
.lineSpacing(4)
.multilineTextAlignment(.leading)
.textSelection(.enabled)
}
.padding()
.background(Color("Agreement Background"))
.clipShape(RoundedRectangle(cornerRadius: 8))
}
}
#Preview {
ServerMessageView(message: "This server has something important to say.")
}
|