import { DemoTooltipAdaptivePositionComponent } from './demos/adaptive-position/adaptive-position'; import { DemoTooltipBasicComponent } from './demos/basic/basic'; import { DemoTooltipClassComponent } from './demos/class/class'; import { DemoTooltipConfigComponent } from './demos/config/config'; import { DemoTooltipContainerComponent } from './demos/container/container'; import { DemoTooltipCustomContentComponent } from './demos/custom-content/custom-content'; import { DemoTooltipDelayComponent } from './demos/delay/delay'; import { DemoTooltipDismissComponent } from './demos/dismiss/dismiss'; import { DemoTooltipDynamicComponent } from './demos/dynamic/dynamic'; import { DemoTooltipDynamicHtmlComponent } from './demos/dynamic-html/dynamic-html'; import { DemoTooltipPlacementComponent } from './demos/placement/placement'; import { DemoTooltipStylingLocalComponent } from './demos/styling-local/styling-local'; import { DemoTooltipTriggersCustomComponent } from './demos/triggers-custom/triggers-custom'; import { DemoTooltipTriggersManualComponent } from './demos/triggers-manual/triggers-manual'; import { ContentSection } from '@ngx-bootstrap-doc/docs'; import { ExamplesComponent } from '@ngx-bootstrap-doc/docs'; import { ApiSectionsComponent } from '@ngx-bootstrap-doc/docs'; import { NgApiDocComponent, NgApiDocConfigComponent } from '@ngx-bootstrap-doc/docs'; export const demoComponentContent: ContentSection[] = [ { name: 'Overview', anchor: 'overview', tabName: 'overview', outlet: ExamplesComponent, content: [ { title: 'Basic', anchor: 'basic', component: require('!!raw-loader!./demos/basic/basic.ts'), html: require('!!raw-loader!./demos/basic/basic.html'), outlet: DemoTooltipBasicComponent }, { title: 'Placement', anchor: 'placement', component: require('!!raw-loader!./demos/placement/placement.ts'), html: require('!!raw-loader!./demos/placement/placement.html'), description: `
Four positioning options are available: top, right,
bottom, and left. Besides that, auto option may be
used to detect a position that fits the component on the screen.
You can disable adaptive position via adaptivePosition input or config option
Use the focus trigger to dismiss tooltips on the next click
that the user makes.
Pass a string as tooltip content
`, outlet: DemoTooltipDynamicComponent }, { title: 'Custom content template', anchor: 'custom-content-template', component: require('!!raw-loader!./demos/custom-content/custom-content.ts'), html: require('!!raw-loader!./demos/custom-content/custom-content.html'), description: `Create <ng-template #myId> with any html allowed by Angular,
and provide template ref [tooltip]="myId" as tooltip content
By using [innerHtml] inside ng-template you
can display any dynamic html
When you have some styles on a parent element that interfere with a tooltip,
you’ll want to specify a container="body" so that the tooltip’s HTML will be
appended to body. This will help to avoid rendering problems in more complex components
(like our input groups, button groups, etc) or inside elements with overflow: hidden
You can manage tooltip using its show(), hide() and toggle() methods.
If you want to manage tooltip's state manually, use triggers=""
Hold on cursor above button for 0,5 second or more to see delayed tooltip
`, outlet: DemoTooltipDelayComponent } ] }, { name: 'Installation', anchor: 'api-reference', tabName: 'api', outlet: ApiSectionsComponent, usage: require('!!raw-loader!./docs/usage.md'), importInfo: 'ng add ngx-bootstrap --component tooltip', content: [ { title: 'TooltipDirective', anchor: 'tooltip-directive', outlet: NgApiDocComponent }, { title: 'TooltipConfig', anchor: 'tooltip-config', outlet: NgApiDocConfigComponent } ] }, { name: 'Examples', anchor: 'examples', tabName: 'examples', outlet: ExamplesComponent, content: [ { title: 'Basic', anchor: 'basic-ex', outlet: DemoTooltipBasicComponent }, { title: 'Placement', anchor: 'placement-ex', outlet: DemoTooltipPlacementComponent }, { title: 'Disable adaptive position', anchor: 'adaptive-position-ex', outlet: DemoTooltipAdaptivePositionComponent }, { title: 'Dismiss on next click', anchor: 'dismiss-ex', outlet: DemoTooltipDismissComponent }, { title: 'Dynamic Content', anchor: 'dynamic-content-ex', outlet: DemoTooltipDynamicComponent }, { title: 'Custom content template', anchor: 'custom-content-template-ex', outlet: DemoTooltipCustomContentComponent }, { title: 'Dynamic Html', anchor: 'dynamic-html-ex', outlet: DemoTooltipDynamicHtmlComponent }, { title: 'Append to body', anchor: 'append-to-body-ex', outlet: DemoTooltipContainerComponent }, { title: 'Configuring defaults', anchor: 'config-defaults-ex', outlet: DemoTooltipConfigComponent }, { title: 'Custom triggers', anchor: 'triggers-custom-ex', outlet: DemoTooltipTriggersCustomComponent }, { title: 'Manual triggering', anchor: 'triggers-manual-ex', outlet: DemoTooltipTriggersManualComponent }, { title: 'Component level styling', anchor: 'styling-local-ex', outlet: DemoTooltipStylingLocalComponent }, { title: 'Custom class', anchor: 'custom-class-ex', outlet: DemoTooltipClassComponent }, { title: 'Tooltip with delay', anchor: 'tooltip-delay-ex', outlet: DemoTooltipDelayComponent } ] } ];