-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFolderIconView.swift
48 lines (37 loc) · 943 Bytes
/
FolderIconView.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// FolderIconView.swift
// FolderColor
//
// Created by 黄宝成 on 2022/5/12.
//
import Foundation
import SwiftUI
struct FolderIconView: View {
var item: FolderColor
var body: some View {
VStack {
ZStack {
MyCustomShape().frame(width: 125, height: 100)
.foregroundColor(
Color.init(.sRGB, red: item.color[0], green: item.color[1], blue: item.color[2], opacity: 0.8)
)
MyCustomShape2().frame(width: 125, height: 76)
.foregroundColor(
Color.init(.sRGB, red: item.color[0], green: item.color[1], blue: item.color[2], opacity: 1)
)
.shadow(radius: 10)
.padding(
EdgeInsets(top: 0, leading: 0, bottom: 20, trailing: 0)
)
}
.frame(width: 125, height: 100)
}
}
}
struct FolderIconView_Previews: PreviewProvider {
static var previews: some View {
SVGView(
item: FolderColor.init(color: [0, 0, 0, 1], isSelected: false)
)
}
}