-
Notifications
You must be signed in to change notification settings - Fork 1
improve button #83
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
improve button #83
Conversation
VislovIvan
commented
Apr 3, 2025
- added new parameters (loading and image)
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.
Overall, it works well, but there are few bugs, and the code needs some improvements.
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.
I see why you included all the if
conditions, but I think it's better to remove them. This way, people can understand how the parameters interact with each other.
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.
Also sort the params in alphabetical order
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.
Add contentSpacing
param and a toggle to show / hide the title (similar to the one in alert / modals)
- buttonImage renamed to image
- inactive while loading
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.
also a bug: tint color is not applied to local
image
Sources/ComponentsKit/Components/Button/Models/ButtonImageSource.swift
Outdated
Show resolved
Hide resolved
- using layout constraints
- moved into shared helpers - duplicated code deleted
Examples/DemosApp/DemosApp/ComponentsPreview/PreviewPages/ButtonPreview.swift
Outdated
Show resolved
Hide resolved
- the image view added based on the imagePosition value in the model