Skip to content

Commit

Permalink
fix tooltip template doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcetin01140 committed Feb 8, 2024
1 parent b8cdb86 commit 0ab6370
Showing 1 changed file with 25 additions and 15 deletions.
40 changes: 25 additions & 15 deletions src/app/showcase/doc/tooltip/templatedoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Component } from '@angular/core';
import { Code } from '../../domain/code';

@Component({
selector: 'options-doc',
selector: 'template-doc',
template: `
<app-docsectiontext>
<p>Tooltip can use either a <i>string</i> or a <i>TemplateRef</i>.</p>
Expand All @@ -22,21 +22,31 @@ import { Code } from '../../domain/code';
export class TemplateDoc {
code: Code = {
basic: `<button pButton [pTooltip]="tooltipContent" tooltipPosition="bottom" label="Button"></button>
<ng-template #tooltipContent>
<div class="flex align-items-center">
<img src="https://primefaces.org/cdn/primeng/images/primeng.svg" height="20" class="mr-2" />
<span> <b>PrimeNG</b> rocks! </span>
</div>
</ng-template>`,
<ng-template #tooltipContent>
<div class="flex align-items-center">
<img src="https://primefaces.org/cdn/primeng/images/primeng.svg" height="20" class="mr-2" />
<span> <b>PrimeNG</b> rocks! </span>
</div>
</ng-template>`,

html: `<div class="card flex justify-content-center">
<button pButton [pTooltip]="tooltipContent" tooltipPosition="bottom" label="Button"></button>
<ng-template #tooltipContent>
<div class="flex align-items-center">
<img src="https://primefaces.org/cdn/primeng/images/primeng.svg" height="20" class="mr-2" />
<span> <b>PrimeNG</b> rocks! </span>
</div>
</ng-template>
</div>`
<button pButton [pTooltip]="tooltipContent" tooltipPosition="bottom" label="Button"></button>
<ng-template #tooltipContent>
<div class="flex align-items-center">
<img src="https://primefaces.org/cdn/primeng/images/primeng.svg" height="20" class="mr-2" />
<span> <b>PrimeNG</b> rocks! </span>
</div>
</ng-template>
</div>`,
typescript: `
import { Component } from '@angular/core';
@Component({
selector: 'tooltip-template-demo',
templateUrl: './tooltip-template-demo.html'
})
export class TooltipTemplateDemo {
}`
};
}

0 comments on commit 0ab6370

Please sign in to comment.