feat: Adds more flagged view style options.
This commit is contained in:
@@ -40,16 +40,15 @@ public struct AnyFlaggedMessageViewStyle: FlaggedMessageViewStyle {
|
||||
|
||||
public struct DefaultFlaggedMessageViewStyle: FlaggedMessageViewStyle {
|
||||
|
||||
|
||||
|
||||
@ViewBuilder
|
||||
public func makeBody(configuration: Configuration) -> some View {
|
||||
if let message = configuration.message {
|
||||
if configuration.message != nil {
|
||||
HStack {
|
||||
Text(configuration.status.title)
|
||||
.bold()
|
||||
.foregroundStyle(configuration.status.flagColor)
|
||||
TextLabel(message)
|
||||
FlaggedStatusLabel(status: configuration.status)
|
||||
FlaggedMessageLabel(message: configuration.message)
|
||||
}
|
||||
.font(.caption)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,14 +57,11 @@ public struct VerticalFlaggedMessageViewStyle: FlaggedMessageViewStyle {
|
||||
|
||||
@ViewBuilder
|
||||
public func makeBody(configuration: Configuration) -> some View {
|
||||
if let message = configuration.message {
|
||||
if configuration.message != nil {
|
||||
VStack(alignment: .leading) {
|
||||
Text(configuration.status.title)
|
||||
.bold()
|
||||
.foregroundStyle(configuration.status.flagColor)
|
||||
TextLabel(message)
|
||||
FlaggedStatusLabel(status: configuration.status)
|
||||
FlaggedMessageLabel(message: configuration.message)
|
||||
}
|
||||
.font(.caption)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user