Version casi lista
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import SwiftUI
|
||||
|
||||
struct TagPill: View {
|
||||
let name: String
|
||||
let color: String
|
||||
|
||||
var body: some View {
|
||||
Text(name)
|
||||
.font(.mealMoodCaption)
|
||||
.foregroundColor(.white)
|
||||
.padding(.horizontal, 10)
|
||||
.padding(.vertical, 4)
|
||||
.background(
|
||||
Capsule()
|
||||
.fill(Color(hex: color))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
struct TagDot: View {
|
||||
let color: String
|
||||
var size: CGFloat = 10
|
||||
|
||||
var body: some View {
|
||||
Circle()
|
||||
.fill(Color(hex: color))
|
||||
.frame(width: size, height: size)
|
||||
.overlay(
|
||||
Circle()
|
||||
.stroke(Color.white.opacity(0.7), lineWidth: 1)
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user