File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
docs/src/app/components/pages/components Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,12 @@ export default class SnackbarPage extends React.Component {
5555 header : 'optional' ,
5656 desc : 'Override the inline-styles of the Snackbar\'s root element.' ,
5757 } ,
58+ {
59+ name : 'bodyStyle' ,
60+ type : 'object' ,
61+ header : 'optional' ,
62+ desc : 'Override the inline-styles of the Snackbar\'s body element.' ,
63+ } ,
5864 ] ,
5965 } ,
6066 {
Original file line number Diff line number Diff line change @@ -63,6 +63,7 @@ const Snackbar = React.createClass({
6363 onDismiss : React . PropTypes . func ,
6464 openOnMount : React . PropTypes . bool ,
6565 style : React . PropTypes . object ,
66+ bodyStyle : React . PropTypes . object ,
6667 } ,
6768
6869 //for passing default theme context to children
@@ -215,6 +216,7 @@ const Snackbar = React.createClass({
215216 const {
216217 onActionTouchTap,
217218 style,
219+ bodyStyle,
218220 ...others ,
219221 } = this . props ;
220222 const styles = this . getStyles ( ) ;
@@ -239,11 +241,13 @@ const Snackbar = React.createClass({
239241 ) ;
240242 }
241243
244+ const mergedBodyStyle = this . mergeStyles ( styles . body , bodyStyle ) ;
245+
242246 const contentStyle = open ? this . mergeStyles ( styles . content , styles . contentWhenOpen ) : styles . content ;
243247
244248 return (
245249 < div { ...others } style = { rootStyles } >
246- < div style = { styles . body } >
250+ < div style = { mergedBodyStyle } >
247251 < div style = { contentStyle } >
248252 < span > { message } </ span >
249253 { actionButton }
You can’t perform that action at this time.
0 commit comments