| 123456789101112131415161718192021222324252627282930313233 |
- import SwiftUI
- struct RedditWebBackBar: View {
- let canGoBack: Bool
- let onBack: () -> Void
- var body: some View {
- HStack(spacing: 0) {
- Button(action: onBack) {
- HStack(spacing: 5) {
- Image(systemName: "chevron.left")
- .font(.system(size: 12, weight: .semibold))
- Text("Back")
- .font(.system(size: 13, weight: .medium))
- }
- }
- .buttonStyle(AppSecondaryButtonStyle())
- .disabled(!canGoBack)
- .opacity(canGoBack ? 1 : 0.4)
- .padding(.leading, 12)
- .padding(.vertical, 8)
- Spacer(minLength: 0)
- }
- .frame(maxWidth: .infinity)
- .background(AppTheme.panelBackground)
- .overlay(alignment: .bottom) {
- Rectangle()
- .fill(AppTheme.border)
- .frame(height: 1)
- }
- }
- }
|