Skip to content

Commit 2a7e6b5

Browse files
committed
fix(tooltip-placement): add close icon to tooltips
1 parent 5415199 commit 2a7e6b5

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

src/app/interactions/tooltip/tooltip-placement/tooltip-placement.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<div class="container">
22
@for (position of positions; track position) {
3-
<div igxTooltip>
4-
{{ position }}
5-
</div>
3+
<div #tooltip="tooltip" igxTooltip>
4+
{{ position }} <igx-icon (click)="tooltip.close()">close</igx-icon>
5+
</div>
66
}
77

88
<button

src/app/interactions/tooltip/tooltip-placement/tooltip-placement.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@
88
height: 120px;
99
border-radius: 0.5rem;
1010
}
11+
12+
igx-icon {
13+
cursor: default;
14+
}

src/app/interactions/tooltip/tooltip-placement/tooltip-placement.component.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ import {
66
VerticalAlignment,
77
PositionSettings,
88
OverlaySettings,
9-
TooltipPositionStrategy
9+
TooltipPositionStrategy,
10+
IgxIconComponent
1011
} from "igniteui-angular";
1112

1213
@Component({
1314
selector: "app-tooltip-placement",
1415
styleUrls: ["./tooltip-placement.component.scss"],
1516
templateUrl: "./tooltip-placement.component.html",
16-
imports: [IgxButtonDirective, IgxTooltipDirective]
17+
imports: [IgxButtonDirective, IgxTooltipDirective, IgxIconComponent]
1718
})
1819
export class TooltipPlacementComponent {
1920
@ViewChildren(IgxTooltipDirective)

0 commit comments

Comments
 (0)