Skip to content

Commit

Permalink
feat(collapse): add demo with inline display (#4630)
Browse files Browse the repository at this point in the history
fixes #2473
  • Loading branch information
tarusin authored and valorkin committed Oct 12, 2018
1 parent 436a2e8 commit 0ec4c70
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
8 changes: 8 additions & 0 deletions demo/src/app/components/+collapse/collapse-section.list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { DemoTopSectionComponent } from '../../docs/demo-section-components/demo
import { ExamplesComponent } from '../../docs/demo-section-components/demo-examples-section/index';
import { ApiSectionsComponent } from '../../docs/demo-section-components/demo-api-section/index';
import { DemoAccessibilityComponent } from './demos/accessibility/accessibility';
import { InlineDisplayDemoComponent } from './demos/inline-display/inline-display';

import { NgApiDocComponent } from '../../docs/api-docs';

Expand Down Expand Up @@ -47,6 +48,13 @@ export const demoComponentContent: ContentSection[] = [
html: require('!!raw-loader?lang=markup!./demos/toggle-manual/toggle-manual.html'),
outlet: ToggleManualDemoComponent
},
{
title: 'Inline display',
anchor: 'inline-display',
component: require('!!raw-loader?lang=typescript!./demos/inline-display/inline-display'),
html: require('!!raw-loader?lang=markup!./demos/inline-display/inline-display.html'),
outlet: InlineDisplayDemoComponent
},
{
title: 'Accessibility',
anchor: 'accessibility',
Expand Down
4 changes: 3 additions & 1 deletion demo/src/app/components/+collapse/demos/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { CollapseDemoComponent } from './basic/basic';
import { ToggleManualDemoComponent } from './toggle-manual/toggle-manual';
import { CollapseDemoEventsComponent } from './events/events';
import { DemoAccessibilityComponent } from './accessibility/accessibility';
import { InlineDisplayDemoComponent } from './inline-display/inline-display';

export const DEMO_COMPONENTS = [
CollapseDemoComponent,
CollapseDemoEventsComponent,
ToggleManualDemoComponent,
DemoAccessibilityComponent
DemoAccessibilityComponent,
InlineDisplayDemoComponent
];
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<button type="button" class="btn btn-success" (click)="collapse.display='inline-block'"
aria-controls="collapseBasic">Inline-block
</button>
<button type="button" class="btn btn-primary" (click)="collapse.display='none'"
aria-controls="collapseBasic">None
</button>
<hr>
<div id="collapseBasic" [collapse]="!isCollapsed" #collapse="bs-collapse" class="card card-block card-header">
<div class="well well-lg">Some content</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Component } from '@angular/core';

@Component({
selector: 'inline-display-demo',
templateUrl: './inline-display.html'
})
export class InlineDisplayDemoComponent {
isCollapsed = false;
}

0 comments on commit 0ec4c70

Please sign in to comment.