diff --git a/SodaLive/Sources/V2/Component/TextTabBar.swift b/SodaLive/Sources/V2/Component/TextTabBar.swift index 71ed5e39..bb496792 100644 --- a/SodaLive/Sources/V2/Component/TextTabBar.swift +++ b/SodaLive/Sources/V2/Component/TextTabBar.swift @@ -11,23 +11,25 @@ struct TextTabBar: View { let title: (Item) -> String var body: some View { - HStack(alignment: .center, spacing: SodaSpacing.s20) { - ForEach(items.prefix(3), id: \.self) { item in - Button { - selectedItem = item - } label: { - Text(title(item)) - .appFont(.heading3) - .foregroundColor(selectedItem == item ? Color.white : Color.gray600) - .frame(height: 52, alignment: .center) - .contentShape(Rectangle()) + ScrollView(.horizontal) { + HStack(alignment: .center, spacing: SodaSpacing.s20) { + ForEach(items.prefix(3), id: \.self) { item in + Button { + selectedItem = item + } label: { + Text(title(item)) + .appFont(.heading3) + .foregroundColor(selectedItem == item ? Color.white : Color.gray600) + .fixedSize(horizontal: true, vertical: false) + .frame(height: 52, alignment: .center) + .contentShape(Rectangle()) + } + .buttonStyle(.plain) } - .buttonStyle(.plain) } - - Spacer() + .padding(.horizontal, SodaSpacing.s20) } - .padding(.horizontal, SodaSpacing.s20) + .scrollIndicators(.hidden) .frame(maxWidth: .infinity) .frame(height: 52, alignment: .leading) .background(Color.black)