Skip to content

Commit fc479bf

Browse files
Merge pull request #403 from ngx-builders/fix--card-component
fix: card component header
2 parents 1514b8e + 181025d commit fc479bf

File tree

5 files changed

+29
-25
lines changed

5 files changed

+29
-25
lines changed

projects/bulma-app/src/app/card/card.component.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@
1414
</a>
1515
</bu-card-header>
1616
<bu-card-content>
17-
<div class="content">
18-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
19-
<a href="#">@bulmaio</a>. <a href="#">#css</a> <a href="#">#responsive</a>
20-
<br />
21-
</div>
17+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus nec iaculis mauris.
18+
<a href="#">@bulmaio</a>. <a href="#">#css</a> <a href="#">#responsive</a>
19+
<br />
2220
</bu-card-content>
2321
<bu-card-footer>
2422
<a href="#" class="card-footer-item">Save</a>
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<div class="card-content">
2-
<div class="content">
3-
<ng-content></ng-content>
4-
</div>
5-
</div>
1+
<div class="content">
2+
<ng-content></ng-content>
3+
</div>
Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
import { ChangeDetectionStrategy, Component, OnInit, ViewEncapsulation } from '@angular/core';
1+
import {
2+
ChangeDetectionStrategy,
3+
Component,
4+
HostBinding,
5+
OnInit,
6+
ViewEncapsulation,
7+
} from '@angular/core';
28

39
@Component({
410
selector: 'bu-card-content',
511
templateUrl: './card-content.component.html',
612
styleUrls: ['./card-content.component.css'],
713
encapsulation: ViewEncapsulation.None,
8-
changeDetection: ChangeDetectionStrategy.OnPush
14+
changeDetection: ChangeDetectionStrategy.OnPush,
915
})
1016
export class BulmaCardContentComponent implements OnInit {
17+
@HostBinding('class') class = 'card-content';
1118

12-
constructor() { }
13-
14-
ngOnInit() {
15-
}
19+
constructor() {}
1620

21+
ngOnInit() {}
1722
}
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
<p class="card-header-title">
2-
<ng-content></ng-content>
3-
</p>
1+
<ng-content></ng-content>
Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
import { ChangeDetectionStrategy, Component, OnInit, ViewEncapsulation } from '@angular/core';
1+
import {
2+
ChangeDetectionStrategy,
3+
Component,
4+
HostBinding,
5+
OnInit,
6+
ViewEncapsulation,
7+
} from '@angular/core';
28

39
@Component({
410
selector: 'bu-card-title',
511
templateUrl: './card-title.component.html',
612
styleUrls: ['./card-title.component.css'],
713
encapsulation: ViewEncapsulation.None,
8-
changeDetection: ChangeDetectionStrategy.OnPush
14+
changeDetection: ChangeDetectionStrategy.OnPush,
915
})
1016
export class BulmaCardTitleComponent implements OnInit {
17+
@HostBinding('class') class = 'card-header-title';
1118

12-
constructor() { }
13-
14-
ngOnInit() {
15-
}
19+
constructor() {}
1620

21+
ngOnInit() {}
1722
}

0 commit comments

Comments
 (0)