Skip to content
This repository was archived by the owner on Aug 7, 2020. It is now read-only.

Commit cbab733

Browse files
authored
Merge pull request #224 from ovh-ux/develop
Develop
2 parents 602d68f + 62101e8 commit cbab733

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed
Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
import { addBooleanParameter } from "@oui-angular/common/component-utils";
22

33
export default class {
4-
constructor ($attrs) {
4+
constructor ($attrs, $element, $timeout) {
55
"ngInject";
66

77
this.$attrs = $attrs;
8+
this.$element = $element;
9+
this.$timeout = $timeout;
810
}
911

1012
$onInit () {
1113
addBooleanParameter(this, "loading");
1214
}
15+
16+
$postLink () {
17+
this.$timeout(() =>
18+
this.$element
19+
.addClass("oui-tile")
20+
);
21+
}
1322
}

packages/oui-tile/src/tile.html

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
<div class="oui-tile">
2-
<h4 class="oui-header_4 oui-tile__title" ng-bind="::$ctrl.heading"></h4>
3-
<p class="oui-tile__legend" ng-if="!!$ctrl.description" ng-bind="::$ctrl.description"></p>
4-
<div class="oui-tile__body"
5-
ng-if="!$ctrl.loading"
6-
ng-transclude>
7-
</div>
8-
<div class="oui-tile__loader"
9-
ng-if="$ctrl.loading">
10-
<oui-spinner size="m"></oui-spinner>
11-
</div>
1+
<h4 class="oui-header_4 oui-tile__title" ng-bind="::$ctrl.heading"></h4>
2+
<p class="oui-tile__legend" ng-if="!!$ctrl.description" ng-bind="::$ctrl.description"></p>
3+
<div class="oui-tile__body"
4+
ng-if="!$ctrl.loading"
5+
ng-transclude>
6+
</div>
7+
<div class="oui-tile__loader"
8+
ng-if="$ctrl.loading">
9+
<oui-spinner size="m"></oui-spinner>
1210
</div>

0 commit comments

Comments
 (0)