Skip to content

Commit 7a18936

Browse files
authored
chore: updated link example and dev app (#DS-2881) (#765)
1 parent 3452692 commit 7a18936

File tree

3 files changed

+51
-16
lines changed

3 files changed

+51
-16
lines changed
Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,30 @@
11
import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';
22
import { KbqIconModule } from '@koobiq/components/icon';
33
import { KbqLinkModule } from '@koobiq/components/link';
4+
import { LinkExamplesModule } from 'packages/docs-examples/components/link';
5+
import { DevThemeToggle } from '../theme-toggle';
46

57
@Component({
68
standalone: true,
7-
imports: [KbqLinkModule, KbqIconModule],
9+
imports: [LinkExamplesModule],
10+
selector: 'dev-examples',
11+
template: `
12+
<link-application-example />
13+
<hr />
14+
`,
15+
changeDetection: ChangeDetectionStrategy.OnPush
16+
})
17+
export class DevExamples {}
18+
19+
@Component({
20+
standalone: true,
21+
imports: [KbqLinkModule, KbqIconModule, DevExamples, DevThemeToggle],
822
selector: 'dev-app',
923
templateUrl: './template.html',
1024
styleUrls: ['./styles.scss'],
1125
encapsulation: ViewEncapsulation.None,
1226
changeDetection: ChangeDetectionStrategy.OnPush
1327
})
1428
export class DevApp {
15-
url = 'http://localhost:3003/';
29+
readonly url = 'http://localhost:3003/';
1630
}

packages/components-dev/link/template.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
<dev-theme-toggle />
2+
3+
<hr />
4+
5+
<dev-examples />
6+
17
<table>
28
<tr class="kbq-text-big">
39
<td>Disabled</td>
Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component } from '@angular/core';
1+
import { ChangeDetectionStrategy, Component } from '@angular/core';
22
import { KbqIconModule } from '@koobiq/components/icon';
33
import { KbqLinkModule } from '@koobiq/components/link';
44

@@ -13,18 +13,33 @@ import { KbqLinkModule } from '@koobiq/components/link';
1313
KbqIconModule
1414
],
1515
template: `
16-
<div style="padding: 16px">
17-
<a class="kbq-link_external" href="https://koobiq.io/en/components/link" target="_blank" kbq-link>
18-
<span class="kbq-link__text">Отчет сканирования в AI Desktop</span>
19-
<i kbq-icon="kbq-north-east_16"></i>
20-
</a>
21-
</div>
22-
<div style="padding: 16px">
23-
<a class="kbq-link_external" href="https://koobiq.io/en/components/link" target="_blank" kbq-link>
24-
<span class="kbq-link__text">Отчет сканирования в AI Desktop</span>
25-
</a>
26-
<img style="margin-left: 5px; vertical-align: middle" alt="" src="favicon.ico" />
27-
</div>
28-
`
16+
<a class="kbq-link_external" href="https://koobiq.io/en/components/link" target="_blank" kbq-link>
17+
<span class="kbq-link__text">The scan report in Deep Inspector</span>
18+
<i kbq-icon="kbq-north-east_16"></i>
19+
</a>
20+
21+
<a
22+
class="kbq-link_external example-link-with-svg-icon"
23+
href="https://koobiq.io/en/components/link"
24+
target="_blank"
25+
kbq-link
26+
>
27+
<span class="kbq-link__text">The scan report in Deep Inspector</span>
28+
<img kbq-icon="" src="https://koobiq.io/assets/images/favicons/icon.svg" width="16" alt="icon" />
29+
</a>
30+
`,
31+
styles: `
32+
:host {
33+
display: flex;
34+
flex-direction: column;
35+
gap: var(--kbq-size-s);
36+
}
37+
38+
.example-link-with-svg-icon {
39+
display: inline-flex;
40+
align-items: center;
41+
}
42+
`,
43+
changeDetection: ChangeDetectionStrategy.OnPush
2944
})
3045
export class LinkApplicationExample {}

0 commit comments

Comments
 (0)