Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions Sources/shadowkit/Core/GradientShadow.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public struct GradientShadow<G: GradientStyle>: ViewModifier {
content
// Layer 1: Tight shadow
.modifier(InnerShadowLayer(
content: content,
gradient: gradient,
radius: dynamicRadius(radius / 16),
opacity: opacity,
Expand All @@ -75,7 +74,6 @@ public struct GradientShadow<G: GradientStyle>: ViewModifier {
))
// Layer 2: Medium shadow
.modifier(InnerShadowLayer(
content: content,
gradient: gradient,
radius: dynamicRadius(radius / 8),
opacity: opacity,
Expand All @@ -84,7 +82,6 @@ public struct GradientShadow<G: GradientStyle>: ViewModifier {
))
// Layer 3: Wide shadow
.modifier(InnerShadowLayer(
content: content,
gradient: gradient,
radius: dynamicRadius(radius / 4),
opacity: opacity,
Expand All @@ -93,7 +90,6 @@ public struct GradientShadow<G: GradientStyle>: ViewModifier {
))
// Layer 4: Broader shadow
.modifier(InnerShadowLayer(
content: content,
gradient: gradient,
radius: dynamicRadius(radius / 2),
opacity: opacity,
Expand All @@ -102,7 +98,6 @@ public struct GradientShadow<G: GradientStyle>: ViewModifier {
))
// Layer 5: Broadest shadow
.modifier(InnerShadowLayer(
content: content,
gradient: gradient,
radius: dynamicRadius(radius),
opacity: opacity,
Expand All @@ -113,7 +108,6 @@ public struct GradientShadow<G: GradientStyle>: ViewModifier {

/// A single layer of the gradient shadow effect.
private struct InnerShadowLayer: ViewModifier {
let content: Any
let gradient: G
let radius: CGFloat
let opacity: Double
Expand Down
2 changes: 1 addition & 1 deletion Sources/shadowkit/Extensions/Gradient+Ext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import SwiftUI
/// - `AngularGradient`
/// - `RadialGradient`
/// - `EllipticalGradient`
public protocol GradientStyle: ShapeStyle { }
public protocol GradientStyle: ShapeStyle & View { }

extension LinearGradient: GradientStyle { }
extension AngularGradient: GradientStyle { }
Expand Down