diff --git a/CHANGELOG.md b/CHANGELOG.md index 061a777e48a6d2..ba659f3f0c2538 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ import MUI from 'material-ui' // no changes here 😀 - [Styles] RaisedButton, FlatButton, and FloatingActionButton now properly use primary/secondary colors - [Menu] Remove Paper (#3559) +- [List] Remove Paper (#3612) ## 0.15.0-alpha.1 ###### _Feb 27, 2016_ diff --git a/src/lists/list.jsx b/src/lists/list.jsx index 2fa0a6eb9e761a..8000c9ab847ab3 100644 --- a/src/lists/list.jsx +++ b/src/lists/list.jsx @@ -1,10 +1,10 @@ import React from 'react'; import PureRenderMixin from 'react-addons-pure-render-mixin'; import PropTypes from '../utils/prop-types'; -import Paper from '../paper'; import getMuiTheme from '../styles/getMuiTheme'; import Subheader from '../Subheader'; import deprecated from '../utils/deprecatedPropType'; +import warning from 'warning'; const List = React.createClass({ @@ -39,7 +39,9 @@ const List = React.createClass({ 'Refer to the `subheader` property.'), /** - * The zDepth prop passed to the Paper element inside list. + * @ignore + * ** Breaking change ** List no longer supports `zDepth`. Instead, wrap it in `Paper` + * or another component that provides zDepth. */ zDepth: PropTypes.zDepth, }, @@ -56,12 +58,6 @@ const List = React.createClass({ PureRenderMixin, ], - getDefaultProps() { - return { - zDepth: 0, - }; - }, - getInitialState() { return { muiTheme: this.context.muiTheme || getMuiTheme(), @@ -91,6 +87,9 @@ const List = React.createClass({ ...other, } = this.props; + warning((typeof zDepth === 'undefined'), 'List no longer supports `zDepth`. Instead, wrap it in `Paper` ' + + 'or another component that provides zDepth.'); + let hasSubheader = false; if (subheader) { @@ -111,14 +110,13 @@ const List = React.createClass({ }; return ( - {subheader && {subheader}} {children} - + ); }, });