import { DemoDropdownBasicComponent } from './demos/basic/basic'; import { DemoDropdownBasicLinkComponent } from './demos/basic/basic-link'; import { DemoDropdownSplitComponent } from './demos/split/split'; import { DemoDropdownTriggersManualComponent } from './demos/triggers-manual/triggers-manual'; import { DemoDropdownDisabledComponent } from './demos/disabled-menu/disabled-menu'; import { DemoDropdownAlignmentComponent } from './demos/alignment/menu-alignment'; import { DemoNestedDropdownsComponent } from './demos/nested-dropdowns/nested-dropdowns'; import { DemoDropdownContainerComponent } from './demos/container/container'; import { DemoDropdownKeyboardComponent } from './demos/keyboard/keyboard'; import { DemoDropupComponent } from './demos/dropup/dropup'; import { DemoDropdownConfigComponent } 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, description: `
Wrap the dropdown’s toggle (your button or link) and the dropdown menu within
dropdown. Dropdowns can be triggered from <a> or <button>
elements to better fit your potential needs.
Any single .btn can be turned into a dropdown toggle with some markup changes.
Here’s how you can put them to work with either <button> elements:
And with <a> elements:
Similarly, create split button dropdowns with virtually the same markup as single
button dropdowns, but with the addition of .dropdown-toggle-split for proper spacing
around the dropdown caret.
By default, a dropdown menu is automatically positioned 100% from the top and along
the left side of its parent. Add class .dropdown-menu-right to a dropdownMenu
to right align the dropdown menu.
Trigger dropdown menus above elements by adding .dropup to the
parent element.
It is possible to override default dropdown config partially or completely.
`, outlet: DemoDropdownConfigComponent } ] }, { name: 'API Reference', anchor: 'api-reference', outlet: ApiSectionsComponent, content: [ { title: 'BsDropdownDirective', anchor: 'dropdown-directive', outlet: NgApiDocComponent }, { title: 'BsDropdownMenuDirective', anchor: 'dropdown-menu-directive', outlet: NgApiDocComponent }, { title: 'BsDropdownToggleDirective', anchor: 'dropdown-toggle-directive', outlet: NgApiDocComponent }, { title: 'BsDropdownConfig', anchor: 'dropdown-config', outlet: NgApiDocConfigComponent } ] } ];