Skip to content

Commit

Permalink
Capsule design for pills
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimillian committed Sep 25, 2024
1 parent 9fbd0a6 commit f0c9178
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,12 @@ struct TimelineQuickAccessPills: View {
case .hashtag:
Label(filter.title.replacingOccurrences(of: "#", with: ""),
systemImage: filter.iconName())
.font(.callout)
case let .list(list):
if let list = currentAccount.lists.first(where: { $0.id == list.id }) {
Label(list.title, systemImage: filter.iconName())
.font(.callout)
}
default:
Label(filter.localizedTitle(), systemImage: filter.iconName())
.font(.callout)
}
}
.transition(.push(from: .leading).combined(with: .opacity))
Expand All @@ -85,6 +82,9 @@ struct TimelineQuickAccessPills: View {
.onDrop(of: [.text], delegate: PillDropDelegate(destinationItem: filter,
items: $pinnedFilters,
draggedItem: $draggedFilter))
.buttonBorderShape(.capsule)
.controlSize(.mini)

}

private func isFilterSupported(_ filter: TimelineFilter) -> Bool {
Expand Down

0 comments on commit f0c9178

Please sign in to comment.