import SwiftUI struct IngredientsSection: View { let ingredients: String @State private var isExpanded = false var body: some View { VStack(alignment: .leading, spacing: 12) { Button { withAnimation { isExpanded.toggle() } } label: { HStack { Image(systemName: "list.bullet") .foregroundColor(.green) Text("Ingredients") .font(.headline) .foregroundColor(.primary) Spacer() Image(systemName: isExpanded ? "chevron.up" : "chevron.down") .foregroundColor(.secondary) } } if isExpanded { Text(ingredients) .font(.subheadline) .foregroundColor(.secondary) .padding() .frame(maxWidth: .infinity, alignment: .leading) .background(Color(.systemGray6)) .cornerRadius(12) } } .padding() .background(Color(.secondarySystemBackground)) .cornerRadius(16) } }