Allow to set ButtonComponent type
What does this MR do and why?
This makes it possible to set the type
attribute directly on the ButtonComponent
:
= render ButtonComponent.new(type: :submit)
Before you had to set it as part of the button_options
but this approach turned out to be not intuitive and error prone.
How to set up and validate locally
- The component is very new and only used in a few places. See its initial MR for examples and review instructions.
- Change one such usage to read
ButtonComponent.new(type: :submit) ....
. The rendered button now should havetype="submit"
instead of"button"
.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Thomas Hutterer