feat: allow wider tooltip width than parent container
This commit is contained in:
@@ -95,7 +95,7 @@
|
||||
<icon name="question-circle"
|
||||
data-toggle="tooltip"
|
||||
html="true"
|
||||
maxWidth="500"
|
||||
maxWidth="525"
|
||||
title="<ul class='no-indent text-left'>
|
||||
<li><strong>Default behavior</strong>: Remap the key on the the current layer of the current keymap.</li>
|
||||
<li><strong>Remap on all keymaps</strong>: Remap key on the current layer of all keymaps.</li>
|
||||
|
||||
@@ -47,15 +47,17 @@ export class TooltipDirective implements AfterContentInit, OnChanges {
|
||||
}
|
||||
|
||||
private getCustomTemplate(): string {
|
||||
let style = '';
|
||||
let tooltipStyle = '';
|
||||
let innerStyle = '';
|
||||
|
||||
if (this.maxWidth) {
|
||||
style = `style="max-width: ${this.maxWidth}px;"`;
|
||||
tooltipStyle = `style="width: ${this.maxWidth}px;"`;
|
||||
innerStyle = `style="max-width: ${this.maxWidth}px;"`;
|
||||
}
|
||||
|
||||
return `<div class="tooltip">
|
||||
return `<div class="tooltip" ${tooltipStyle}>
|
||||
<div class="tooltip-arrow"></div>
|
||||
<div class="tooltip-inner" ${style}></div>
|
||||
<div class="tooltip-inner" ${innerStyle}></div>
|
||||
</div>`;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user