From 9a58a5e119694d49a9dc4445da3823577f9061cc Mon Sep 17 00:00:00 2001 From: myronliu347 Date: Thu, 24 Oct 2019 18:54:59 +0800 Subject: [PATCH] feat(Message): toast add style & className prop --- src/message/toast.jsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/message/toast.jsx b/src/message/toast.jsx index ac4db4edcb..3cc6033833 100644 --- a/src/message/toast.jsx +++ b/src/message/toast.jsx @@ -29,6 +29,8 @@ class Mask extends React.Component { overlayProps: PropTypes.object, onClose: PropTypes.func, timeoutId: PropTypes.string, + style: PropTypes.style, + className: PropTypes.string, }; static defaultProps = { @@ -40,6 +42,8 @@ class Mask extends React.Component { in: 'pulse', out: 'zoomOut', }, + style: {}, + className: '', }; state = { @@ -80,6 +84,8 @@ class Mask extends React.Component { animation, overlayProps, timeoutId, + className, + style, ...others } = this.props; /* eslint-enable */ @@ -102,7 +108,8 @@ class Mask extends React.Component { type={type} shape="toast" title={title} - className={`${prefix}message-wrapper`} + style={style} + className={`${prefix}message-wrapper ${className}`} onClose={this.handleClose} > {content}