-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Tooltip optionally take a TemplateRef * Working! * Use content variable * Add template documentation * Update prop docs * Change to const * Run code formatting * Remove duplicate CommonModule * Remove propsdoc * Run apidoc * ChangeDetectorRef not actually being used * Call this just template now * changeDetector not being used --------- Co-authored-by: Justin White <[email protected]>
- Loading branch information
Showing
5 changed files
with
80 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { Code } from '../../domain/code'; | ||
|
||
@Component({ | ||
selector: 'options-doc', | ||
template: ` <section> | ||
<app-docsectiontext [title]="title" [id]="id"> | ||
<p>Tooltip can use either a <i>string</i> or a <i>TemplateRef</i>.</p> | ||
</app-docsectiontext> | ||
<div class="card flex justify-content-center"> | ||
<input type="text" pInputText [pTooltip]="tooltipContent" placeholder="hover to display tooltip" /> | ||
<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> | ||
<app-code [code]="code" selector="tooltip-template-demo"></app-code> | ||
</section>` | ||
}) | ||
export class TemplateDoc { | ||
@Input() id: string; | ||
|
||
@Input() title: string; | ||
|
||
code: Code = { | ||
basic: ` | ||
<input type="text" pInputText [pTooltip]="tooltipContent" placeholder="hover to display tooltip"> | ||
<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: ` | ||
<input type="text" pInputText [pTooltip]="tooltipContent" placeholder="hover to display tooltip"> | ||
<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>` | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a9d0355
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
primeng-ssr-test – ./
primeng-ssr-test-git-master-primeng-test.vercel.app
primeng-ssr-test.vercel.app
primeng-ssr-test-primeng-test.vercel.app