in Broadcasting/Views/Components/NotificationView.swift [86:142]
func body(content: Content) -> some View {
ZStack {
content
if isPresent {
VStack {
ZStack {
Rectangle()
.overlay(
RoundedRectangle(cornerRadius: 12)
.fill(color)
.background(Color.clear)
)
.frame(height: height)
.frame(maxWidth: .infinity)
VStack(alignment: .leading, spacing: 2) {
Group {
HStack(alignment: .top) {
Image(systemName: icon)
.font(.system(size: 12))
.opacity(0.6)
.foregroundColor(textColor)
.padding(.leading, 3)
Text(title)
.font(Constants.fAppRegularSmall)
.opacity(0.6)
.multilineTextAlignment(.leading)
.foregroundColor(textColor)
}
}
.padding(.horizontal, 16)
Text(message)
.font(Constants.fAppRegular)
.padding(.horizontal, 5)
.multilineTextAlignment(.leading)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal, 16)
.foregroundColor(textColor)
}
}
.cornerRadius(12)
.onTapGesture {
isPresent.toggle()
}
Spacer()
}
.padding(.horizontal, 8)
.onAppear {
if type != .warning {
startDismissTimer()
}
}
}
}
}