-
+
+
+
+
+
+
diff --git a/src/platform/core/expansion-panel/expansion-panel.component.scss b/src/platform/core/expansion-panel/expansion-panel.component.scss
index 010de28b91..5393cb8db7 100644
--- a/src/platform/core/expansion-panel/expansion-panel.component.scss
+++ b/src/platform/core/expansion-panel/expansion-panel.component.scss
@@ -1,22 +1,19 @@
:host {
display: block;
- .td-expansion-panel {
- transition: 400ms all ease;
- .td-expansion-panel-header {
- position: relative;
- outline: none;
- &:focus,
- &:hover {
- cursor: pointer;
- }
- &.mat-disabled {
- background: none;
- cursor: auto;
- }
- .td-expansion-panel-header-content {
- height: 48px;
- padding: 0 16px;
- }
+ .td-expansion-panel-header {
+ position: relative;
+ outline: none;
+ &:focus,
+ &:hover {
+ cursor: pointer;
+ }
+ &.mat-disabled {
+ background: none;
+ cursor: auto;
+ }
+ .td-expansion-panel-header-content {
+ height: 48px;
+ padding: 0 16px;
}
}
}
diff --git a/src/platform/core/expansion-panel/expansion-panel.component.ts b/src/platform/core/expansion-panel/expansion-panel.component.ts
index a28b7ab951..d1d6b515ca 100644
--- a/src/platform/core/expansion-panel/expansion-panel.component.ts
+++ b/src/platform/core/expansion-panel/expansion-panel.component.ts
@@ -1,4 +1,5 @@
-import { Component, Directive, Input, Output, TemplateRef, ViewContainerRef, ContentChild } from '@angular/core';
+import { Component, Directive, Input, Output, TemplateRef, ViewContainerRef, ContentChild,
+ ElementRef, Renderer2 } from '@angular/core';
import { EventEmitter } from '@angular/core';
import { TemplatePortalDirective } from '@angular/material';
@@ -107,6 +108,11 @@ export class TdExpansionPanelComponent {
*/
@Output() collapsed: EventEmitter
= new EventEmitter();
+ constructor(private _renderer: Renderer2,
+ private _elementRef: ElementRef) {
+ this._renderer.addClass(this._elementRef.nativeElement, 'td-expansion-panel');
+ }
+
/**
* Method executed when [TdExpansionPanelComponent] is clicked.
*/
@@ -149,8 +155,10 @@ export class TdExpansionPanelComponent {
if (this._expand !== newExpand) {
this._expand = newExpand;
if (newExpand) {
+ this._renderer.addClass(this._elementRef.nativeElement, 'td-expanded');
this._onExpanded();
} else {
+ this._renderer.removeClass(this._elementRef.nativeElement, 'td-expanded');
this._onCollapsed();
}
return true;
diff --git a/src/platform/core/expansion-panel/expansion-panel.module.ts b/src/platform/core/expansion-panel/expansion-panel.module.ts
index 508675cffe..a3713c3445 100644
--- a/src/platform/core/expansion-panel/expansion-panel.module.ts
+++ b/src/platform/core/expansion-panel/expansion-panel.module.ts
@@ -6,8 +6,10 @@ import { MdRippleModule, MdIconModule, PortalModule } from '@angular/material';
import { TdExpansionPanelComponent, TdExpansionPanelHeaderDirective, TdExpansionPanelLabelDirective,
TdExpansionPanelSublabelDirective, TdExpansionPanelSummaryComponent } from './expansion-panel.component';
+import { TdExpansionPanelGroupComponent } from './expansion-panel-group.component';
const TD_EXPANSION_PANEL: Type[] = [
+ TdExpansionPanelGroupComponent,
TdExpansionPanelComponent,
TdExpansionPanelHeaderDirective,
TdExpansionPanelLabelDirective,
@@ -16,6 +18,7 @@ const TD_EXPANSION_PANEL: Type[] = [
];
export { TdExpansionPanelComponent } from './expansion-panel.component';
+export { TdExpansionPanelGroupComponent } from './expansion-panel-group.component';
@NgModule({
imports: [