Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
parent
08fef9ffe3
commit
3f385ac0f8
@ -94,10 +94,6 @@ struct PresetLibrarySheet: View {
|
|||||||
VStack(alignment: .leading, spacing: Design.Spacing.xSmall) {
|
VStack(alignment: .leading, spacing: Design.Spacing.xSmall) {
|
||||||
HStack {
|
HStack {
|
||||||
Text(preset.title).styled(.heading, emphasis: .primary)
|
Text(preset.title).styled(.heading, emphasis: .primary)
|
||||||
|
|
||||||
if isAdded {
|
|
||||||
SymbolIcon("checkmark.circle.fill", size: .badge, color: AppStatus.success)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Text(preset.theme).styled(.subheading, emphasis: .secondary)
|
Text(preset.theme).styled(.subheading, emphasis: .secondary)
|
||||||
@ -106,21 +102,27 @@ struct PresetLibrarySheet: View {
|
|||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
VStack(alignment: .trailing, spacing: Design.Spacing.xSmall) {
|
VStack(alignment: .trailing, spacing: Design.Spacing.xSmall) {
|
||||||
Text(String(localized: "\(preset.habits.count) habits")).styled(.caption, emphasis: .tertiary)
|
if isAdded {
|
||||||
|
SymbolIcon("checkmark.circle.fill", size: .badge, color: AppStatus.success)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Habit preview and Time of Day
|
// Habit preview and Time of Day
|
||||||
HStack(alignment: .center, spacing: Design.Spacing.small) {
|
HStack(alignment: .center, spacing: Design.Spacing.small) {
|
||||||
// Habit icons
|
// Habit icons and count
|
||||||
HStack(spacing: Design.Spacing.small) {
|
HStack(spacing: Design.Spacing.small) {
|
||||||
ForEach(preset.habits.prefix(4)) { habit in
|
HStack(spacing: Design.Spacing.xxxSmall) {
|
||||||
SymbolIcon(habit.symbolName, size: .badge, color: AppTextColors.tertiary)
|
ForEach(preset.habits.prefix(4)) { habit in
|
||||||
|
SymbolIcon(habit.symbolName, size: .badge, color: AppTextColors.tertiary)
|
||||||
|
}
|
||||||
|
|
||||||
|
if preset.habits.count > 4 {
|
||||||
|
Text("+\(preset.habits.count - 4)").styled(.caption2, emphasis: .tertiary)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if preset.habits.count > 4 {
|
Text(String(localized: "\(preset.habits.count) habits")).styled(.caption, emphasis: .tertiary)
|
||||||
Text("+\(preset.habits.count - 4)").styled(.caption2, emphasis: .tertiary)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user