Siri: full-width Directions row on price card — fixes squashed 2-line button in narrow snippet
This commit is contained in:
@@ -356,6 +356,7 @@ struct FuelPriceCard: View {
|
||||
var directionsIntent: OpenDirectionsIntent? = nil
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 10) {
|
||||
HStack(spacing: 14) {
|
||||
Image(systemName: "fuelpump.fill")
|
||||
.font(.title2)
|
||||
@@ -374,18 +375,17 @@ struct FuelPriceCard: View {
|
||||
}
|
||||
}
|
||||
Spacer(minLength: 8)
|
||||
VStack(alignment: .trailing, spacing: 6) {
|
||||
Text(price)
|
||||
.font(.title2.bold())
|
||||
.monospacedDigit()
|
||||
}
|
||||
if let directionsIntent {
|
||||
Button(intent: directionsIntent) {
|
||||
Label("Directions", systemImage: "map.fill")
|
||||
.font(.footnote.weight(.medium))
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
.buttonStyle(.bordered)
|
||||
.controlSize(.small)
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(12)
|
||||
|
||||
Reference in New Issue
Block a user