Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kubalani committed Jan 6, 2021
1 parent e32fdf4 commit 5d8198c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions ios/FluentUI/DrawerVnext/Drawer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ public class DrawerState: NSObject, ObservableObject {
onStateChange?()
}
}
@objc @Published public var presentationDirection: DrawerDirection = .left

@objc public var presentationDirection: DrawerDirection = .left

/// Set `backgroundDimmed` to `true` to dim the spacer area between drawer and base view.
/// If set to `false` it restores to `clear` color
@objc @Published public var backgroundDimmed: Bool = false

/// anitmation duration when drawer is collapsed/expanded
@objc @Published public var animationDuration: Double = 0.0
@objc public var animationDuration: Double = 0.0
}

// MARK: - Drawer Token
Expand Down
6 changes: 3 additions & 3 deletions ios/FluentUI/DrawerVnext/SlideOverPanel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ struct SlideOverPanel<Content: View>: View {
HStack {
if direction == .right {
InteractiveSpacer(defaultBackgroundColor: $tokens.backgroundClearColor)
.onTapGesture (count: 1, perform: actionOnBackgroundTap ?? {})
.onTapGesture (perform: actionOnBackgroundTap ?? {})
}

content
Expand All @@ -59,7 +59,7 @@ struct SlideOverPanel<Content: View>: View {

if direction == .left {
InteractiveSpacer(defaultBackgroundColor: $tokens.backgroundClearColor)
.onTapGesture (count: 1, perform: actionOnBackgroundTap ?? {})
.onTapGesture (perform: actionOnBackgroundTap ?? {})
}
}
.background(isOpen ? tokens.backgroundDimmedColor.opacity(backgroundLayerOpacity) : tokens.backgroundClearColor)
Expand Down Expand Up @@ -101,7 +101,7 @@ public struct InteractiveSpacer: View {
public var body: some View {
ZStack {
defaultBackgroundColor
}
}.contentShape(Rectangle())
}
}

Expand Down

0 comments on commit 5d8198c

Please sign in to comment.