Skip to content

Commit 0e6a753

Browse files
committed
Update triggerText to be an ng-content
1 parent e77229b commit 0e6a753

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/dialog/tooltip/tooltip-definition.component.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import { Component, Input, HostBinding } from "@angular/core";
33
@Component({
44
selector: "ibm-tooltip-definition",
55
template: `
6-
<button class="bx--tooltip__trigger" [attr.aria-describedby]="id">{{triggerText}}</button>
6+
<button class="bx--tooltip__trigger" [attr.aria-describedby]="id">
7+
<ng-content></ng-content>
8+
</button>
79
<div
810
[id]="id"
911
[ngClass]="{
@@ -22,10 +24,6 @@ export class TooltipDefinition {
2224

2325
@Input() id = `definition-tooltip-${TooltipDefinition.tooltipItemCount}`;
2426
/**
25-
* The content to put into the trigger.
26-
*/
27-
@Input() triggerText: string;
28-
/**
2927
* Body content for the `TooltipDefinition`.
3028
*/
3129
@Input() content: string;

src/dialog/tooltip/tooltip.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ storiesOf("Tooltip", module)
122122
.add("Definition tooltip", () => ({
123123
template: `
124124
<ibm-tooltip-definition
125-
[triggerText]="triggerText"
126125
[content]="content"
127126
[placement]="placement">
127+
{{triggerText}}
128128
</ibm-tooltip-definition>
129129
`,
130130
props: {

0 commit comments

Comments
 (0)