Skip to content

Commit 2cf57f7

Browse files
committed
refactor(docs-callout): allow ng-content
1 parent c1e1496 commit 2cf57f7

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed
Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
<c-callout class="bg-white:dark:bg-transparent" color="info">
2+
<ng-container *ngTemplateOutlet="default"></ng-container>
3+
</c-callout>
4+
5+
<ng-template #default>
6+
<p *ngIf="!!name">
27
An Angular {{name}} component{{plural ? 's' : ''}} {{plural ? 'have' : 'has'}} been created as a native Angular
38
version
49
of Bootstrap {{name}}. {{name}} {{plural ? 'are' : 'is'}} delivered with some new features,
510
variants, and unique design that matches CoreUI Design System requirements.
6-
<br />
7-
<br />
8-
For more information please visit our official
9-
<a href="{{href}}" target="_blank">
10-
documentation of CoreUI Components Library for Angular
11-
</a>
12-
.
13-
</c-callout>
11+
</p>
12+
13+
<ng-content></ng-content>
14+
15+
<br>
16+
For more information please visit our official <a href="{{href}}" target="_blank">documentation of CoreUI Components Library for Angular.</a>
17+
</ng-template>

src/components/docs-callout/docs-callout.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import packageJson from '../../../package.json';
88
})
99
export class DocsCalloutComponent {
1010

11-
@Input() name: string = 'CoreUI';
11+
@Input() name: string = '';
1212

1313
constructor() { }
1414

@@ -22,7 +22,6 @@ export class DocsCalloutComponent {
2222
set href(value: string) {
2323
const version = packageJson?.config?.coreui_library_short_version;
2424
const docsUrl = packageJson?.config?.coreui_library_docs_url ?? 'https://coreui.io/angular/';
25-
// const path: string = version ? `${version}/#/${value}` : '#';
2625
const path: string = version ? `${version}/${value}` : '';
2726
this._href = `${docsUrl}${path}`;
2827
}

0 commit comments

Comments
 (0)