refactor(ui): 精简重复及解释性悬浮提示
This commit is contained in:
@@ -10,7 +10,6 @@ struct ResourceCard<Content: View>: View {
|
||||
var secondaryValueColor: Color? = nil
|
||||
var status: String? = nil
|
||||
var statusWarning = false
|
||||
var statusHelp: Text? = nil
|
||||
var warningText: Text? = nil
|
||||
var detail: String? = nil
|
||||
@ViewBuilder var content: () -> Content
|
||||
@@ -30,7 +29,6 @@ struct ResourceCard<Content: View>: View {
|
||||
.foregroundStyle(statusWarning ? .red : color)
|
||||
.padding(.horizontal, 6).frame(height: 16)
|
||||
.background((statusWarning ? Color.red : color).opacity(0.14), in: Capsule())
|
||||
.help(statusHelp ?? Text(verbatim: status))
|
||||
if let warningText {
|
||||
warningText
|
||||
.font(.system(size: 10)).foregroundStyle(.red).lineLimit(1)
|
||||
|
||||
Reference in New Issue
Block a user