1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Add list toolbar component.

This commit is contained in:
Kia Lam 2019-01-23 11:46:43 -05:00
parent 1becd4c39d
commit 05c24df9e3
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,18 @@
const templateUrl = require('~components/list/list-toolbar.partial.html');
function atListToolbar () {
return {
restrict: 'E',
replace: true,
transclude: true,
templateUrl,
scope: {
onExpand: '=',
onCollapse: '=',
sortOnly: '=',
isCollapsed: '=',
}
};
}
export default atListToolbar;

View File

@ -0,0 +1,5 @@
<div class="at-List-toolbar--attached">
<div ng-class="isCollapsed ? 'active' : ''" ng-if="!sortOnly" class="at-List-toolbar-item" ng-click="onCollapse()">Compact</div>
<div ng-class="!isCollapsed ? 'active' : ''" ng-if="!sortOnly" class="at-List-toolbar-item" ng-click="onExpand()">Expanded</div>
<div class="at-List-toolbar-item">Sort</div>
</div>