diff --git a/DemoApp/DemoApp/ContentView.swift b/DemoApp/DemoApp/ContentView.swift index b8dcd30..fef7ad7 100644 --- a/DemoApp/DemoApp/ContentView.swift +++ b/DemoApp/DemoApp/ContentView.swift @@ -73,9 +73,9 @@ struct ContentView: View { struct ContentView_Previews: PreviewProvider { static let neumorphism = NeumorphismManager( - isDark: true, + isDark: false, lightColor: Color(hex: "C1D2EB"), - darkColor: Color(hex: "2C292C") + darkColor: Color(hex: "131A20") ) static var previews: some View { diff --git a/Sources/Modifier/NeumorphismShadowModifier.swift b/Sources/Modifier/NeumorphismShadowModifier.swift index e7f5609..ba57e94 100644 --- a/Sources/Modifier/NeumorphismShadowModifier.swift +++ b/Sources/Modifier/NeumorphismShadowModifier.swift @@ -11,7 +11,7 @@ public struct NeumorphismShadowModifier: ViewModifier { private let x: CGFloat private let y: CGFloat - public init(darkShadowColor: Color? = nil, lightShadowColor: Color? = nil, radius: CGFloat = 16, x: CGFloat = 9, y: CGFloat = 9, isAnimation: Bool = false) { + public init(darkShadowColor: Color? = nil, lightShadowColor: Color? = nil, radius: CGFloat = 8, x: CGFloat = 8, y: CGFloat = 8, isAnimation: Bool = false) { self.darkShadowColor = darkShadowColor self.lightShadowColor = lightShadowColor if isAnimation { @@ -30,11 +30,13 @@ public struct NeumorphismShadowModifier: ViewModifier { content .shadow( color: darkShadowColor ?? neumorphism.color.darkerColor(), - radius: radius, x: x, y: y + radius: radius, + x: x, y: y ) .shadow( color: lightShadowColor ?? neumorphism.color.lighterColor(), - radius: radius, x: -x, y: -y + radius: radius, + x: -x, y: -y ) } }