mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-04-26 19:38:37 +03:00
19 lines
441 B
Swift
19 lines
441 B
Swift
import SwiftUI
|
|
|
|
extension View {
|
|
func innerShadow<S: Shape, ST: ShapeStyle>(
|
|
using shape: S = Rectangle(),
|
|
stroke: ST = Color.black,
|
|
width: CGFloat = 6,
|
|
blur: CGFloat = 6
|
|
) -> some View {
|
|
return self
|
|
.overlay(
|
|
shape
|
|
.stroke(stroke, lineWidth: width)
|
|
.blur(radius: blur)
|
|
.mask(shape)
|
|
)
|
|
}
|
|
}
|