@@ -3,13 +3,11 @@ import classNames from 'classnames';
33
44import BootstrapMixin from './BootstrapMixin' ;
55import CollapsibleMixin from './CollapsibleMixin' ;
6- import collapsable from './utils/deprecatedProperty' ;
76
87const Panel = React . createClass ( {
98 mixins : [ BootstrapMixin , CollapsibleMixin ] ,
109
1110 propTypes : {
12- collapsable,
1311 collapsible : React . PropTypes . bool ,
1412 onSelect : React . PropTypes . func ,
1513 header : React . PropTypes . node ,
@@ -56,21 +54,18 @@ const Panel = React.createClass({
5654 } ,
5755
5856 render ( ) {
59- let classes = this . getBsClassSet ( ) ;
60- const collapsible = this . props . collapsible || this . props . collapsable ;
61-
6257 return (
6358 < div { ...this . props }
64- className = { classNames ( this . props . className , classes ) }
65- id = { collapsible ? null : this . props . id } onSelect = { null } >
59+ className = { classNames ( this . props . className , this . getBsClassSet ( ) ) }
60+ id = { this . props . collapsible ? null : this . props . id } onSelect = { null } >
6661 { this . renderHeading ( ) }
67- { collapsible ? this . renderCollapsableBody ( ) : this . renderBody ( ) }
62+ { this . props . collapsible ? this . renderCollapsibleBody ( ) : this . renderBody ( ) }
6863 { this . renderFooter ( ) }
6964 </ div >
7065 ) ;
7166 } ,
7267
73- renderCollapsableBody ( ) {
68+ renderCollapsibleBody ( ) {
7469 let collapseClass = this . prefixClass ( 'collapse' ) ;
7570
7671 return (
@@ -147,21 +142,20 @@ const Panel = React.createClass({
147142
148143 renderHeading ( ) {
149144 let header = this . props . header ;
150- const collapsible = this . props . collapsible || this . props . collapsable ;
151145
152146 if ( ! header ) {
153147 return null ;
154148 }
155149
156150 if ( ! React . isValidElement ( header ) || Array . isArray ( header ) ) {
157- header = collapsible ?
158- this . renderCollapsableTitle ( header ) : header ;
151+ header = this . props . collapsible ?
152+ this . renderCollapsibleTitle ( header ) : header ;
159153 } else {
160154 const className = classNames (
161155 this . prefixClass ( 'title' ) , header . props . className
162156 ) ;
163157
164- if ( collapsible ) {
158+ if ( this . props . collapsible ) {
165159 header = cloneElement ( header , {
166160 className,
167161 children : this . renderAnchor ( header . props . children )
@@ -190,7 +184,7 @@ const Panel = React.createClass({
190184 ) ;
191185 } ,
192186
193- renderCollapsableTitle ( header ) {
187+ renderCollapsibleTitle ( header ) {
194188 return (
195189 < h4 className = { this . prefixClass ( 'title' ) } >
196190 { this . renderAnchor ( header ) }
0 commit comments