I'm building a generic button lightning component, and I don't find how to implement a parameter which will trigger a controller JS function on the component including the button ( exactly like the press parameter of ui:button )
Sample:
CmpButton.cmp
<aura:attribute name="press" type="????">
<ui:button press="???" />
SomeComponent.cmp
<c:CmpButton press="{c.someComponentMethod}" />
SomeComponent.js
someComponentMethod: function(component,event,helper){
// action on SomeComponent
}
I would like SomeComponent.someComponentMethod to be called when my included button is pressed
Many thanks & best regards