import { experimentOn } from '@islavi/ng2-component-lab'; import { ArrowPlacement, TooltipPlacement } from '../../src/angular/tooltip/tooltip.directive'; const customTemplate = ` .sdc-custom-tooltip-template-title { font-size: 20px; font-weight: bold; background-color: $black; color: $white; text-align: center; } .sdc-custom-tooltip-template-content { background-color: $black; color: $white; display: inline-block; text-align: center; } .sdc-custom-tooltip-template-image { width: 100%; height:100%; display: inline-block; text-align: center; background-color: #ffffff; } `; export default experimentOn('Tooltip') .group("Tooltip",[ { id: 'leftAlignmentTextTooltip', showSource: true, title: 'Tooltip with short text (left placement)', description: 'left placement', context: { placement: TooltipPlacement.Left, arrowPlacement: ArrowPlacement.LeftTop }, template: `
A long text name, very long, long text ...
]]>
A long text name, very long, long text ...
` }, { id: 'rightAlignmentHtmlCustomStyleTooltip', showSource: true, title: 'Tooltip with HTML template and custom style (right placement)', description: 'right placement', context: { placement: TooltipPlacement.Right, arrowPlacement: ArrowPlacement.LeftTop }, styles: [customTemplate], template: ` Template Input:Title... Title... Title... Title... Title...Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed risus nisl, egestas vitae erat non, pulvinar lacinia libero. Integer pulvinar pellentesque accumsan. Sed hendrerit lacus eu tempus pharetra
]]>
Title... Title... Title... Title... Title...
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed risus nisl, egestas vitae erat non, pulvinar lacinia libero. Integer pulvinar pellentesque accumsan. Sed hendrerit lacus eu tempus pharetra
` }, { id: 'topAlignmentTextTooltip', showSource: true, title: 'Tooltip with text (top placement)', description: 'top placement', context: { placement: TooltipPlacement.Top, arrowPlacement: ArrowPlacement.LeftTop }, template: `A long text name,very long, long text]]>