aboutsummaryrefslogtreecommitdiff
path: root/Map/Presentation/Base Components/EvolutionPicker/EvolutionPickerMenuHeader.swift
blob: 095c74ca324159be57d2c016887dd005c47b18f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import SwiftUI

struct EvolutionPickerMenuHeader: View {

  let key: LocalizedStringKey

  var body: some View {
    HStack(alignment: .center, spacing: Dimensions.Spacing.regular) {
      Text(key)
        .font(.Theme.Caption.emphasized)
        .lineSpacing(Dimensions.LineHeight.caption - Dimensions.FontSize.caption)
        .padding(.vertical, Dimensions.Spacing.cozy)
        .textCase(.uppercase)
        .padding(.leading, Dimensions.Spacing.regular)
        .layoutPriority(1)
      Spacer()
        .frame(height: 1)
        .background(Color.Theme.UI.foreground.opacity(0.2))
    }
    .padding(.horizontal, Dimensions.Spacing.regular)
    .cornerRadius(Dimensions.EvolutionPicker.radius)
  }
}

#Preview {
  EvolutionPickerMenuHeader(key: "stage_type.section.types")
}