-
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.
Browse files
Browse the repository at this point in the history
Feature/#61 recommend skeleton
- Loading branch information
Showing
16 changed files
with
297 additions
and
86 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
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
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.beige, | ||
background: Color.Skeleton.orange, | ||
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
Oops, something went wrong.