fix(ios): unify toolbar controls and release build 3
This commit is contained in:
@@ -697,3 +697,33 @@ public struct AIToolbarButton: View {
|
||||
.accessibilityLabel(title)
|
||||
}
|
||||
}
|
||||
|
||||
public struct AIIconButton: View {
|
||||
private let title: String
|
||||
private let systemImage: String
|
||||
private let kind: AIButtonStyle.Kind
|
||||
private let action: () -> Void
|
||||
|
||||
public init(
|
||||
_ title: String,
|
||||
systemImage: String,
|
||||
kind: AIButtonStyle.Kind = .secondary,
|
||||
action: @escaping () -> Void
|
||||
) {
|
||||
self.title = title
|
||||
self.systemImage = systemImage
|
||||
self.kind = kind
|
||||
self.action = action
|
||||
}
|
||||
|
||||
public var body: some View {
|
||||
Button {
|
||||
action()
|
||||
} label: {
|
||||
Image(systemName: systemImage)
|
||||
.font(.system(size: 16, weight: .semibold))
|
||||
}
|
||||
.buttonStyle(AIButtonStyle(kind: kind, size: .icon))
|
||||
.accessibilityLabel(title)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user