File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
DesignSystem/Sources/DesignSystem/Components Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -356,14 +356,25 @@ public struct PostDisplayView: View {
356356 Capsule ( )
357357 . fill ( backgroundColor)
358358 )
359- Button ( action: action ?? { } ) {
360- content
359+ return Button ( action: action ?? { } ) {
360+ ZStack {
361+ content
362+ if isLoading {
363+ Capsule ( )
364+ . fill ( backgroundColor. opacity ( 0.6 ) )
365+ ProgressView ( )
366+ . scaleEffect ( 0.6 )
367+ . tint ( textColor)
368+ }
369+ }
361370 }
362371 . buttonStyle ( . plain)
372+ . disabled ( !isEnabled || isLoading || action == nil )
373+ . allowsHitTesting ( isEnabled && !isLoading && action != nil )
374+ . opacity ( isEnabled && !isLoading ? 1.0 : 0.6 )
363375 . accessibilityElement ( children: . combine)
364376 . accessibilityLabel ( accessibilityLabel)
365377 . accessibilityHint ( accessibilityHint ?? " " )
366-
367378 }
368379}
369380
You can’t perform that action at this time.
0 commit comments