From 80c03083f274b8dffb56923f35d3382b1686d278 Mon Sep 17 00:00:00 2001 From: Manuel Mazzuola Date: Tue, 10 Nov 2015 11:15:28 +0100 Subject: [PATCH] [Snackbar] Custom body style Merge the body style with a custom style passed by properties --- src/snackbar.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/snackbar.jsx b/src/snackbar.jsx index 129e4b381bb2d7..24e452f8312333 100644 --- a/src/snackbar.jsx +++ b/src/snackbar.jsx @@ -63,6 +63,7 @@ const Snackbar = React.createClass({ onDismiss: React.PropTypes.func, openOnMount: React.PropTypes.bool, style: React.PropTypes.object, + bodyStyle: React.PropTypes.object }, //for passing default theme context to children @@ -215,6 +216,7 @@ const Snackbar = React.createClass({ const { onActionTouchTap, style, + bodyStyle, ...others, } = this.props; const styles = this.getStyles(); @@ -239,11 +241,13 @@ const Snackbar = React.createClass({ ); } + const mergedBodyStyle = this.mergeStyles(styles.body, bodyStyle); + const contentStyle = open ? this.mergeStyles(styles.content, styles.contentWhenOpen) : styles.content; return (
-
+
{message} {actionButton}