-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jongnan
committed
Aug 11, 2024
1 parent
8f3b07f
commit f21aed5
Showing
10 changed files
with
255 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
Projects/Features/Recommend/Sources/Presentation/Modifier/SkeletonModifier.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// SkeletonModifier.swift | ||
// Recommend | ||
// | ||
// Created by 김종윤 on 8/8/24. | ||
// | ||
|
||
import SwiftUI | ||
import SkeletonUI | ||
|
||
import ResourceKit | ||
|
||
struct SkeletonModifier: ViewModifier { | ||
let isShow: Bool | ||
let radius: CGFloat | ||
let width: CGFloat? | ||
let height: CGFloat? | ||
|
||
func body(content: Content) -> some View { | ||
content | ||
.skeleton( | ||
with: isShow, | ||
animation: .linear(duration: 2, delay: 0, speed: 1), | ||
appearance: .gradient( | ||
.linear, | ||
color: Color.Skeleton.home, | ||
background: Color.Skeleton.homeback, | ||
radius: 1 | ||
), | ||
shape: .rounded(.radius(radius)) | ||
) | ||
.frame(width: width, height: height) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.