@@ -60,27 +60,7 @@ extension PointOfSaleSettingsView {
6060 }
6161 Spacer ( )
6262
63- Button {
64- analytics. track ( . pointOfSaleSettingsHelpTapped)
65- selection = . help
66- } label: {
67- HStack ( spacing: POSSpacing . small) {
68- if let icon = SidebarNavigation . help. icon {
69- Image ( systemName: icon)
70- . font ( . posBodyMediumBold)
71- . foregroundStyle ( Color . posOnSurface)
72- }
73- Text ( SidebarNavigation . help. title)
74- . font ( . posBodyMediumBold)
75- . foregroundStyle ( Color . posOnSurface)
76- }
77- . padding ( )
78- . frame ( maxWidth: . infinity, alignment: . leading)
79- . dynamicTypeSize ( ... DynamicTypeSize . accessibility2)
80- }
81- . buttonStyle ( . plain)
82- . accessibilityAddTraits ( . isButton)
83- . accessibilityLabel ( SidebarNavigation . help. title)
63+ helpView
8464 }
8565 . padding ( . horizontal, POSPadding . medium)
8666 }
@@ -106,6 +86,31 @@ extension PointOfSaleSettingsView {
10686 EmptyView ( )
10787 }
10888 }
89+
90+ @ViewBuilder
91+ private var helpView : some View {
92+ Button {
93+ analytics. track ( . pointOfSaleSettingsHelpTapped)
94+ selection = . help
95+ } label: {
96+ HStack ( spacing: POSSpacing . small) {
97+ if let icon = SidebarNavigation . help. icon {
98+ Image ( systemName: icon)
99+ . font ( . posBodyMediumBold)
100+ . foregroundStyle ( Color . posOnSurface)
101+ }
102+ Text ( SidebarNavigation . help. title)
103+ . font ( . posBodyMediumBold)
104+ . foregroundStyle ( Color . posOnSurface)
105+ }
106+ . padding ( )
107+ . frame ( maxWidth: . infinity, alignment: . leading)
108+ . dynamicTypeSize ( ... DynamicTypeSize . accessibility2)
109+ }
110+ . buttonStyle ( . plain)
111+ . accessibilityAddTraits ( . isButton)
112+ . accessibilityLabel ( SidebarNavigation . help. title)
113+ }
109114}
110115
111116extension PointOfSaleSettingsView {
0 commit comments