komponent
komponent copied to clipboard
Allow injecting a custom renderer class
This PR does not really alter the behaviour of the gem, but it allows easier implementation for custom behaviour.
- The
component
helper optionally accepts a custom renderer class - The
ComponentRenderer
itself has been refactored a bit to allow customization of property assignment
Use case:
We'd like to use komponent
in a setup where we need to customize the property assignment to enable localization (including inline editing).
The changes in this PR would implement an interface for customization only - without binding to a special kind of customization.
Note: The .rubocop.yml
change is due to a warning by rubocop itself
Thanks @apauly for your contribution. We'll review it shortly.
Would you mind adding documentation about this change in the README?
Hi @Spone ,
sorry for the delayed response - I've now added a section to the README.