Simplify how we build bubbles for previewing purposes, make use of the new bubbleBackground modifier.

This commit is contained in:
Stefan Ceriu
2024-12-13 15:38:23 +02:00
committed by Stefan Ceriu
parent 681daf50ea
commit c97dcc18f2
7 changed files with 15 additions and 44 deletions
@@ -5,12 +5,13 @@
// Please see LICENSE in the repository root for full details.
//
import Compound
import SwiftUI
extension View {
func bubbleBackground(isOutgoing: Bool,
insets: EdgeInsets,
color: Color? = nil) -> some View {
func bubbleBackground(isOutgoing: Bool = true,
insets: EdgeInsets = .init(top: 8, leading: 12, bottom: 8, trailing: 12),
color: Color? = .compound.bgSubtleSecondary) -> some View {
modifier(TimelineItemBubbleBackgroundModifier(isOutgoing: isOutgoing,
insets: insets,
color: color))