Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ChevronIcon): Update chevron color to 666666 #943

Merged
merged 1 commit into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions Mail/Components/ChevronIcon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,32 +37,13 @@ struct ChevronIcon: View {
}
}

enum Color {
case primary, secondary

var color: MailResourcesColors {
switch self {
case .primary:
return MailResourcesAsset.textPrimaryColor
case .secondary:
return MailResourcesAsset.textSecondaryColor
}
}
}

let style: Style
let color: Color

init(style: Style, color: Color = .secondary) {
self.style = style
self.color = color
}

var body: some View {
MailResourcesAsset.arrowUp.swiftUIImage
.resizable()
.frame(width: 12, height: 12)
.foregroundColor(color.color)
.foregroundColor(MailResourcesAsset.textSecondaryColor)
.padding(.vertical, 2)
.padding(.horizontal, 1.5)
.rotationEffect(style.rotationAngle)
Expand Down
2 changes: 1 addition & 1 deletion Mail/Views/Menu Drawer/Folders/FolderCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ struct FolderCellContent: View {
HStack(spacing: UIConstants.menuDrawerHorizontalItemSpacing) {
if canCollapseSubFolders && cellType == .menuDrawer {
Button(action: collapseFolder) {
ChevronIcon(style: folder.isExpanded ? .up : .down, color: .secondary)
ChevronIcon(style: folder.isExpanded ? .up : .down)
}
.opacity(level == 0 && !folder.children.isEmpty ? 1 : 0)
.accessibilityLabel(MailResourcesStrings.Localizable.contentDescriptionButtonExpandFolder(folder.name))
Expand Down
2 changes: 1 addition & 1 deletion Mail/Views/Menu Drawer/Folders/UserFoldersListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct UserFoldersListView: View {
}
} label: {
HStack(spacing: 12) {
ChevronIcon(style: isExpanded ? .up : .down, color: .secondary)
ChevronIcon(style: isExpanded ? .up : .down)
Text(MailResourcesStrings.Localizable.buttonFolders)
.textStyle(.bodySmallSecondary)
Spacer()
Expand Down
2 changes: 1 addition & 1 deletion Mail/Views/Menu Drawer/Items/MenuDrawerItemsListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ struct MenuDrawerItemsListView<Content: View>: View {
}
} label: {
HStack(spacing: 12) {
ChevronIcon(style: isExpanded ? .up : .down, color: .secondary)
ChevronIcon(style: isExpanded ? .up : .down)
Text(title)
.textStyle(.bodySmallSecondary)
Spacer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ struct MailboxesManagementView: View {
.lineLimit(1)
Spacer()
if hasOtherMailboxes {
ChevronIcon(style: navigationDrawerState.showMailboxes ? .up : .down, color: .primary)
ChevronIcon(style: navigationDrawerState.showMailboxes ? .up : .down)
}
}
.environment(\.isEnabled, true)
Expand Down
2 changes: 1 addition & 1 deletion Mail/Views/Settings/SettingsSubMenuCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct SettingsSubMenuCell<Content: View>: View {
}
}
Spacer()
ChevronIcon(style: .right, color: .secondary)
ChevronIcon(style: .right)
}
}
}
Expand Down
Loading