forked from openshift/origin-web-console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactionChip.js
36 lines (36 loc) · 1012 Bytes
/
actionChip.js
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
30
31
32
33
34
35
36
'use strict';
// <div>
// <div>Chips</div>
// <div row mobile="column">
// <action-chip
// key="'1'"></action-chip>
// <action-chip
// key="'2'"
// value="'foo'"></action-chip>
// <action-chip
// key="'3'"
// action="foo('shizzle', 'pop')"></action-chip>
// <action-chip
// key="'4'"
// value="'bar'"
// icon="'fa fa-check'"
// action="foo('shizzle', 'pop2')"></action-chip>
// </div>
// </div>
angular
.module('openshiftConsole')
.directive('actionChip', function() {
return {
restrict: 'E',
scope: {
key: '=?',
value: '=?',
keyHelp: '=?', // optional, or empty string for false
valueHelp: '=', // optional, or empty string for false
action: '&?', // callback fn,
actionIcon: '=?', // default is pficon pficon-close
showAction: '=?' // bool to show-hide the action button
},
templateUrl: 'views/directives/action-chip.html'
};
});