Skip to content

Commit

Permalink
fix neumorphismShadow
Browse files Browse the repository at this point in the history
  • Loading branch information
tsuzukihashi committed Mar 29, 2020
1 parent 703cb51 commit d897a60
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions Sources/Extensions/ViewExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,21 @@ import SwiftUI

@available(iOS 13.0, *)
public extension View {
func neumorphismShadow(isAnimation: Bool = false) -> some View {
self.modifier(NeumorphismShadowModifier(isAnimation: isAnimation))
func neumorphismShadow(
darkShadowColor: Color? = nil,
lightShadowColor: Color? = nil,
radius: CGFloat = 8,
x: CGFloat = 4,
y: CGFloat = 4,
isAnimation: Bool = false
) -> some View {
self.modifier(NeumorphismShadowModifier(
darkShadowColor: darkShadowColor,
lightShadowColor: lightShadowColor,
radius: radius,
x: x,
y: y,
isAnimation: isAnimation
))
}
}

0 comments on commit d897a60

Please sign in to comment.