import { DemoAlertBasicComponent } from './demos/basic/basic'; import { DemoAlertLinkComponent } from './demos/link/link'; import { DemoAlertContentComponent } from './demos/content/content'; import { DemoAlertDismissComponent } from './demos/dismiss/dismiss'; import { DemoAlertDynamicHtmlComponent } from './demos/dynamic-html/dynamic-html'; import { DemoAlertDynamicContentComponent } from './demos/dynamic-content/dynamic-content'; import { DemoAlertTimeoutComponent } from './demos/dismiss-on-timeout/dismiss-on-timeout'; import { DemoAlertStylingGlobalComponent } from './demos/styling-global/styling-global'; import { DemoAlertStylingLocalComponent } from './demos/styling-local/styling-local'; import { DemoAlertConfigComponent } from './demos/config/config'; import { ContentSection } from '../../docs/models/content-section.model'; import { DemoTopSectionComponent } from '../../docs/demo-section-components/demo-top-section/index'; import { ExamplesComponent } from '../../docs/demo-section-components/demo-examples-section/index'; import { ApiSectionsComponent } from '../../docs/demo-section-components/demo-api-section/index'; import { NgApiDocComponent, NgApiDocConfigComponent } from '../../docs/api-docs'; export const demoComponentContent: ContentSection[] = [ { name: 'Usage', anchor: 'usage', outlet: DemoTopSectionComponent, content: { doc: require('html-loader!markdown-loader!./docs/usage.md') } }, { name: 'Examples', anchor: 'examples', outlet: ExamplesComponent, content: [ { title: 'Basic', anchor: 'basic', description: `
Alerts are available for any length of text, as well as an optional dismiss
button. For proper styling, use one of the four required
contextual classes (e.g., .alert-success). For inline
dismissal, use the dismiss
property.
Use the .alert-link utility class to quickly provide matching
colored links within any alert.
Alerts can also contain additional HTML elements like headings and paragraphs.
`, component: require('!!raw-loader?lang=typescript!./demos/content/content.ts'), html: require('!!raw-loader?lang=markup!./demos/content/content.html'), outlet: DemoAlertContentComponent }, { title: 'Dismissing', anchor: 'dismissing', description: `Alerts have dismiss option. Enabling it will show close button
to the right of the alert.
Sometimes you will need to show dynamically generated html in alerts, here is how you can make it. And don't forget to sanitize your html.
`, component: require('!!raw-loader?lang=typescript!./demos/dynamic-html/dynamic-html.ts'), html: require('!!raw-loader?lang=markup!./demos/dynamic-html/dynamic-html.html'), outlet: DemoAlertDynamicHtmlComponent }, { title: 'Dynamic content', anchor: 'dynamic-content', description: `Alerts fully support bindings.
`, component: require('!!raw-loader?lang=typescript!./demos/dynamic-content/dynamic-content.ts'), html: require('!!raw-loader?lang=markup!./demos/dynamic-content/dynamic-content.html'), outlet: DemoAlertDynamicContentComponent }, { title: 'Dismiss on timeout', anchor: 'dismiss-on-timeout', description: `You can simply set timeout in milliseconds to dismissOnTimeout
property to create self closable alerts.
You can add additional types of alerts globally.
`, component: require('!!raw-loader?lang=typescript!./demos/styling-global/styling-global.ts'), html: require('!!raw-loader?lang=markup!./demos/styling-global/styling-global.html'), outlet: DemoAlertStylingGlobalComponent }, { title: 'Component level styling', anchor: 'local-styling', description: `You can add additional types of alerts directly to containing component
`, component: require('!!raw-loader?lang=typescript!./demos/styling-local/styling-local.ts'), html: require('!!raw-loader?lang=markup!./demos/styling-local/styling-local.html'), outlet: DemoAlertStylingLocalComponent }, { title: 'Configuring defaults', anchor: 'configuration', description: `It is possible to override default alert config partially or completely.
`, component: require('!!raw-loader?lang=typescript!./demos/config/config.ts'), html: require('!!raw-loader?lang=markup!./demos/config/config.html'), outlet: DemoAlertConfigComponent } ] }, { name: 'API Reference', anchor: 'api-reference', outlet: ApiSectionsComponent, content: [ { title: 'AlertComponent', anchor: 'alert-component', outlet: NgApiDocComponent }, { title: 'AlertConfig', anchor: 'alert-config', outlet: NgApiDocConfigComponent } ] } ];