Skip to content

Commit

Permalink
Extract constant
Browse files Browse the repository at this point in the history
  • Loading branch information
dus7 committed Jul 18, 2024
1 parent cbb40c8 commit 349fe31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DuckDuckGo/ShortcutItemView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct ShortcutItemView: View {
.overlay(alignment: .topTrailing) {
if let accessoryType {
ShortcutAccessoryView(accessoryType: accessoryType)
.frame(width: 24)
.frame(width: Constant.accessorySize)
.offset(Constant.accessoryOffset)
}
}
Expand All @@ -54,6 +54,7 @@ struct ShortcutItemView: View {
}

private enum Constant {
static let accessorySize = 24.0
static let accessoryOffset = CGSize(width: 6, height: -6)
}
}
Expand Down

0 comments on commit 349fe31

Please sign in to comment.