File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ class Card extends Component {
1212 * Can be used to render elements inside the Card.
1313 */
1414 children : PropTypes . node ,
15+ /**
16+ * Override the inline-styles of the container element.
17+ */
18+ containerStyle : PropTypes . object ,
1519 /**
1620 * If true, this card component is expandable. Can be set on any child of the `Card` component.
1721 */
@@ -111,16 +115,20 @@ class Card extends Component {
111115 lastElement . type . muiName === 'CardTitle' ) ) ;
112116 const {
113117 style,
118+ containerStyle,
114119 ...other ,
115120 } = this . props ;
116121
117122 const mergedStyles = Object . assign ( {
118123 zIndex : 1 ,
119124 } , style ) ;
125+ const containerMergedStyles = Object . assign ( {
126+ paddingBottom : addBottomPadding ? 8 : 0 ,
127+ } , containerStyle ) ;
120128
121129 return (
122130 < Paper { ...other } style = { mergedStyles } >
123- < div style = { { paddingBottom : addBottomPadding ? 8 : 0 } } >
131+ < div style = { containerMergedStyles } >
124132 { newChildren }
125133 </ div >
126134 </ Paper >
You can’t perform that action at this time.
0 commit comments