All files / util/actions Action.js

100% Statements 2/2
100% Branches 0/0
100% Functions 0/0
100% Lines 2/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29            2x                                   2x        
import DefineMap from 'can-define/map/map';
import DefineList from 'can-define/list/list';
 
/**
 * @module util/actions/Action
 */
export const Action = DefineMap.extend('Action', {
    /** @lends util/actions/Action.prototype */
    /**
     * Classes to apply to icon in button.
     * @type {String}
     */
    iconClass: 'string',
    /**
     * Classes to apply to button
     * @type {String}
     */
    buttonClass: {type: 'string', default: 'btn'},
    /**
     * A click handler function to call when the button is clicked
     */
    onclick: {}
});
 
export const ActionList = DefineList.extend('ActionList', {
    '#': Action
});
 
export default Action;