UNPKG

raptor

Version:

RaptorJS provides an AMD module loader that works in Node, Rhino and the web browser. It also includes various sub-modules to support building optimized web applications.

27 lines (25 loc) 926 B
define( 'components/widgets/ButtonRenderer', function(require) { return { render: function(input, context) { var disabled = input.disabled === true; context.renderTemplate( "components/widgets/Button", { label: input.label, id: input.id || ('btn' + context.uniqueId()), widgetConfig: { disabled: disabled, label: input.label }, invokeBody: input.invokeBody, buttonAttrs: { disabled: disabled ? null : undefined, type: input.type || "button" } }); } }; } );