UNPKG

@wavemaker/m3-custom-widgets

Version:

A collection of custom widgets

25 lines (24 loc) 1.01 kB
/* * Use App.getDependency for Dependency Injection * eg: var DialogService = App.getDependency('DialogService'); */ /* perform any action on widgets/variables within this block */ Widget.onReady = function () { /* * variables can be accessed through 'Widget.Variables' property here * e.g. to get dataSet in a staticVariable named 'loggedInUser' use following script * Widget.Variables.loggedInUser.getData() * * widgets can be accessed through 'Widget.Widgets' property here * e.g. to get value of text widget named 'username' use following script * 'Widget.Widgets.username.datavalue' */ Widget.Widgets.iconButton.class += " " + Widget.props.style; Widget.Widgets.iconButton.class += " " + Widget.props.tonal; if (Widget.props.button_size == "small") { Widget.Widgets.iconButton.class += " " + "icon-btn-sm"; } else if (Widget.props.button_size == "large") { Widget.Widgets.iconButton.class += " " + "icon-btn-lg"; } };