Merge pull request #26 from hkgood/cursor/fix-home-stats-background-6baf
fix: HomeStatsCard background ShapeStyle compile error
This commit is contained in:
@@ -57,7 +57,21 @@ struct HomeStatsCard: View {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.background(cardBackground, in: RoundedRectangle(cornerRadius: Radius.xl, style: .continuous))
|
.background {
|
||||||
|
ZStack(alignment: .top) {
|
||||||
|
palette.surface
|
||||||
|
LinearGradient(
|
||||||
|
colors: [
|
||||||
|
palette.accent.opacity(0.10),
|
||||||
|
palette.accent.opacity(0.02),
|
||||||
|
palette.surface.opacity(0)
|
||||||
|
],
|
||||||
|
startPoint: .topLeading,
|
||||||
|
endPoint: .bottomTrailing
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.clipShape(RoundedRectangle(cornerRadius: Radius.xl, style: .continuous))
|
||||||
.overlay(
|
.overlay(
|
||||||
RoundedRectangle(cornerRadius: Radius.xl, style: .continuous)
|
RoundedRectangle(cornerRadius: Radius.xl, style: .continuous)
|
||||||
.stroke(palette.divider, lineWidth: 0.5)
|
.stroke(palette.divider, lineWidth: 0.5)
|
||||||
@@ -68,21 +82,6 @@ struct HomeStatsCard: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private var cardBackground: some View {
|
|
||||||
ZStack(alignment: .top) {
|
|
||||||
palette.surface
|
|
||||||
LinearGradient(
|
|
||||||
colors: [
|
|
||||||
palette.accent.opacity(0.10),
|
|
||||||
palette.accent.opacity(0.02),
|
|
||||||
palette.surface.opacity(0)
|
|
||||||
],
|
|
||||||
startPoint: .topLeading,
|
|
||||||
endPoint: .bottomTrailing
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private func statCell(systemImage: String, value: String, label: LocalizedStringKey) -> some View {
|
private func statCell(systemImage: String, value: String, label: LocalizedStringKey) -> some View {
|
||||||
VStack(alignment: .leading, spacing: Spacing.xs) {
|
VStack(alignment: .leading, spacing: Spacing.xs) {
|
||||||
HStack(spacing: 6) {
|
HStack(spacing: 6) {
|
||||||
|
|||||||
Reference in New Issue
Block a user