[FEATURE REQUEST] Allow macro addition to Button class #718
martynaskre
started this conversation in
Ideas
Replies: 2 comments 5 replies
-
Yes! This would be so useful! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello. could you share more examples of how to use it and what we would need to refactor? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Allow macro addition to Button class
Summary
Currently, Button class does not allow any modifications. Class cannot be extended nor it can be extended with macros.
Why is this needed?
Let's say Powergrid is customised with custom template. Then, the template requires icons with actions buttons. Buttons cannot be hardcoded, because there are different types of them.
Suggested Solution(s)
The most simple solution would be to add
Illuminate\Support\Traits\Macroable
trait to Button class. This would allow to easily extend class with required methods, e.g.$button->icon('...')
. Of course it would still require some refactoring in Helpers/Actions class, which should not be major.Beta Was this translation helpful? Give feedback.
All reactions