Playground
Edit the view and the controller, then press Run. Nothing leaves your browser.
Loading the example
<k:Stack row="true" gap="10">
<k:Button kind="primary" text="Save" press=".onPress"/>
<k:Button kind="accent" text="Approve" icon="check" press=".onPress"/>
<k:Button text="Duplicate" press=".onPress"/>
<k:Button kind="ghost" icon="palette" label="Appearance" press=".onPress"/>
<k:Button kind="danger" text="Reject" press=".onPress"/>
</k:Stack>sap.ui.define(["sap/ui/core/mvc/Controller", "kor/ui/Toast"], (Controller, Toast) => Controller.extend("sample.Buttons", {
onPress(event) {
const button = event.getSource();
Toast.show("Pressed: " + (button.getText() || button.getLabel()));
}
}));