|
1 | 1 | import SwiftUI |
2 | 2 |
|
3 | 3 | struct PointOfSaleItemListEmptyView: View { |
| 4 | + @Environment(\.dynamicTypeSize) private var dynamicTypeSize |
| 5 | + @Environment(\.floatingControlAreaSize) private var floatingControlAreaSize: CGSize |
4 | 6 | private let baseItem: ItemListBaseItem |
5 | 7 |
|
6 | 8 | init(base: ItemListBaseItem) { |
7 | 9 | self.baseItem = base |
8 | 10 | } |
9 | 11 |
|
10 | 12 | var body: some View { |
11 | | - VStack(alignment: .center, spacing: PointOfSaleItemListErrorLayout.headerSpacing) { |
12 | | - Spacer() |
13 | | - Image(decorative: PointOfSaleAssets.magnifierNotFound.imageName) |
14 | | - .resizable() |
15 | | - .aspectRatio(contentMode: .fit) |
16 | | - .frame(width: Constants.iconSize, height: Constants.iconSize) |
17 | | - .foregroundColor(.posOnSurfaceVariantHighest) |
18 | | - Text(title) |
19 | | - .foregroundStyle(Color.posOnSurfaceVariantHighest) |
20 | | - .font(.posHeadingBold) |
21 | | - Text(subtitle) |
22 | | - .foregroundStyle(Color.posOnSurfaceVariantHighest) |
23 | | - .font(.posBodyLargeRegular()) |
24 | | - .padding([.leading, .trailing]) |
25 | | - Text(hint) |
26 | | - .foregroundStyle(Color.posOnSurfaceVariantHighest) |
27 | | - .font(.posBodyLargeRegular()) |
28 | | - .padding([.leading, .trailing]) |
29 | | - Spacer() |
| 13 | + ScrollView { |
| 14 | + VStack(alignment: .center, spacing: PointOfSaleItemListErrorLayout.headerSpacing) { |
| 15 | + Spacer() |
| 16 | + Image(decorative: PointOfSaleAssets.magnifierNotFound.imageName) |
| 17 | + .resizable() |
| 18 | + .aspectRatio(contentMode: .fit) |
| 19 | + .frame(width: Constants.iconSize, height: Constants.iconSize) |
| 20 | + .foregroundColor(.posOnSurfaceVariantHighest) |
| 21 | + .renderedIf(!dynamicTypeSize.isAccessibilitySize) |
| 22 | + Text(title) |
| 23 | + .foregroundStyle(Color.posOnSurfaceVariantHighest) |
| 24 | + .font(. posHeadingBold) |
| 25 | + Text(subtitle) |
| 26 | + .foregroundStyle(Color.posOnSurfaceVariantHighest) |
| 27 | + .font(.posBodyLargeRegular()) |
| 28 | + .padding([.leading, .trailing]) |
| 29 | + Text(hint) |
| 30 | + .foregroundStyle(Color.posOnSurfaceVariantHighest) |
| 31 | + .font(.posBodyLargeRegular()) |
| 32 | + .padding([.leading, .trailing]) |
| 33 | + Spacer() |
| 34 | + .renderedIf(!dynamicTypeSize.isAccessibilitySize) |
| 35 | + } |
| 36 | + .padding(.bottom, floatingControlAreaSize.height) |
30 | 37 | } |
31 | 38 | } |
32 | 39 | } |
|
0 commit comments