Skip to content

Commit

Permalink
Update the Gradient Masking Logic (#7)
Browse files Browse the repository at this point in the history
* Remove blending gradient

* Update the masking logic

* Update `CHANGELOG.md`
  • Loading branch information
nik3212 authored Jul 19, 2024
1 parent 8032031 commit 3bf24bb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
# Change Log
All notable changes to this project will be documented in this file.

## [Unreleased]
#### 1.x Releases
- `1.0.x` Releases - [1.0.0](#100) | [1.0.1](#101) | [1.0.2](#102)

## [1.0.2](https://github.com/space-code/skeleton-ui/releases/tag/1.0.2)
Released on 2024-07-19.

#### Added
- Add an index to each view
- Added in Pull Request[#5](https://github.com/space-code/skeleton-ui/pull/5).
- Added in Pull Request[#6](https://github.com/space-code/skeleton-ui/pull/6).

#### 1.x Releases
- `1.0.x` Releases - [1.0.0](#100) | [1.0.1](#101)
#### Updated
- Update the masking logic
- Updated in Pull Request [#7](https://github.com/space-code/skeleton-ui/pull/7).

## [1.0.1](https://github.com/space-code/skeleton-ui/releases/tag/1.0.1)
Released on 2024-01-14.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public struct ShimmerViewModifier: ViewModifier {
// MARK: ViewModifier

public func body(content: Content) -> some View {
content
.mask(GradientAnimationView(gradient: gradient, animation: animation))
GradientAnimationView(gradient: gradient, animation: animation)
.mask(content)

Check warning on line 38 in Sources/SkeletonUI/Classes/Core/ViewModifiers/ShimmerViewModifier.swift

View check run for this annotation

Codecov / codecov/patch

Sources/SkeletonUI/Classes/Core/ViewModifiers/ShimmerViewModifier.swift#L37-L38

Added lines #L37 - L38 were not covered by tests
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public struct SkeletonViewModifier<ContentView: View>: ViewModifier {
content(index)
.frame(width: (configuration.scales[safe: index] ?? 1) * geometry.size.width)
}
.shimmering(isActive: true, gradient: configuration.gradient, animation: configuration.animation)

Check warning on line 58 in Sources/SkeletonUI/Classes/Core/ViewModifiers/SkeletonViewModifier.swift

View check run for this annotation

Codecov / codecov/patch

Sources/SkeletonUI/Classes/Core/ViewModifiers/SkeletonViewModifier.swift#L58

Added line #L58 was not covered by tests
}
.shimmering(isActive: true, gradient: configuration.gradient, animation: configuration.animation)
}
.padding(configuration.insets)
}
Expand Down

0 comments on commit 3bf24bb

Please sign in to comment.