-
Notifications
You must be signed in to change notification settings - Fork 0
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
[alert-helper] Add helper for showing alert based on optional #37
base: develop
Are you sure you want to change the base?
Conversation
Mostly for displaying enums
public extension View { | ||
func alert<T, Message, Actions>(presenting: Binding<T?>, | ||
title: (T) -> LocalizedStringKey, | ||
@ViewBuilder message: (T) -> Message, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function parameters should be aligned vertically if they're in multiple lines in a declaration.
func alert<T, Message, Actions>(presenting: Binding<T?>, | ||
title: (T) -> LocalizedStringKey, | ||
@ViewBuilder message: (T) -> Message, | ||
@ViewBuilder actions: (T) -> Actions) -> some View where Actions: View, Message: View { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function parameters should be aligned vertically if they're in multiple lines in a declaration.
|
||
func alert<T, Message, Actions>(presenting: Binding<T?>, | ||
title: (T) -> String, | ||
@ViewBuilder message: (T) -> Message, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function parameters should be aligned vertically if they're in multiple lines in a declaration.
func alert<T, Message, Actions>(presenting: Binding<T?>, | ||
title: (T) -> String, | ||
@ViewBuilder message: (T) -> Message, | ||
@ViewBuilder actions: (T) -> Actions) -> some View where Actions: View, Message: View { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function parameters should be aligned vertically if they're in multiple lines in a declaration.
func alert<T, Actions>(presenting: Binding<T?>, | ||
title: (T) -> LocalizedStringKey, | ||
message: (T) -> LocalizedStringKey, | ||
@ViewBuilder actions: (T) -> Actions) -> some View where Actions: View { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function parameters should be aligned vertically if they're in multiple lines in a declaration.
func cancellableSheet<Content>(isPresented: Binding<Bool>, | ||
cancelButtonLabel: LocalizedStringKey, | ||
cancelPlacement: ToolbarItemPlacement = .topBarLeading, | ||
@ViewBuilder content: @escaping () -> Content) -> some View where Content : View { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function parameters should be aligned vertically if they're in multiple lines in a declaration.
func alert<T, Actions>(presenting: Binding<T?>, | ||
title: (T) -> LocalizedStringKey, | ||
message: (T) -> String, | ||
@ViewBuilder actions: (T) -> Actions) -> some View where Actions: View { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function parameters should be aligned vertically if they're in multiple lines in a declaration.
func alert<T, Actions>(presenting: Binding<T?>, | ||
title: (T) -> String, | ||
message: (T) -> LocalizedStringKey, | ||
@ViewBuilder actions: (T) -> Actions) -> some View where Actions: View { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function parameters should be aligned vertically if they're in multiple lines in a declaration.
func alert<T, Actions>(presenting: Binding<T?>, | ||
title: (T) -> String, | ||
message: (T) -> String, | ||
@ViewBuilder actions: (T) -> Actions) -> some View where Actions: View { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function parameters should be aligned vertically if they're in multiple lines in a declaration.
var itemSpacing: CGFloat? | ||
var items: [AnyView] | ||
|
||
init(labelGenerator: @escaping (Int) -> Label, labelSpacing: CGFloat? = nil, itemSpacing: CGFloat? = nil, @OrderedListBuilder items: () -> [AnyView]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line should be 140 characters or less: currently 155 characters
Code Climate has analyzed commit c6197cc and detected 10 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Mostly for displaying enums