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: `
Lorem ipsum dolor sit amet, show tooltip ,consectetur adipiscing elit. Sed risus nisl, egestas vitae erat non, pulvinar lacinia libero. Integer pulvinar pellentesque accumsan. show tooltip Sed hendrerit lacus eu tempus pharetra
` }, { id: 'leftAlignmentMultiLineTextTooltip', showSource: true, title: 'Tooltip with multi line text (left placement)', description: 'left placement', context: { placement: TooltipPlacement.Left, arrowPlacement: ArrowPlacement.LeftTop }, template: `
The is text example, show tooltip , more text
` }, { id: 'customStyleTooltip', showSource: true, title: 'Tooltip with custom style', description: 'Tooltip with custom style, define your class and style it via css.', context: { text: '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' }, template: `
Some text example, show tooltip, more text
` }, { id: 'rightAlignmentHtmlTooltip', showSource: true, title: 'Tooltip with HTML template (right placement)', description: 'right placement', context: { placement: TooltipPlacement.Right, arrowPlacement: ArrowPlacement.LeftTop }, styles: [customTemplate], template: ` Template Input:

                    

A long text name, very long, long text ...

]]>
The is text example, show tooltip , more 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

]]>
The is text example, show tooltip , more text
` }, { id: 'topAlignmentTextTooltip', showSource: true, title: 'Tooltip with text (top placement)', description: 'top placement', context: { placement: TooltipPlacement.Top, arrowPlacement: ArrowPlacement.LeftTop }, template: `
The is text example, show tooltip , more text
` }, { id: 'bottomAlignmentHtmlTooltip', showSource: true, title: 'Tooltip with HTML template (bottom placement)', description: 'bottom placement', context: { placement: TooltipPlacement.Bottom, arrowPlacement: ArrowPlacement.LeftTop }, template: ` Template Input:
A long text name,
                    
very long, long text
]]>
The is text example, link example , more text
` }, ]);