Skip to content

Commit 9a58a5e

Browse files
committed
feat(Message): toast add style & className prop
1 parent 24fe9ac commit 9a58a5e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/message/toast.jsx

+8-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ class Mask extends React.Component {
2929
overlayProps: PropTypes.object,
3030
onClose: PropTypes.func,
3131
timeoutId: PropTypes.string,
32+
style: PropTypes.style,
33+
className: PropTypes.string,
3234
};
3335

3436
static defaultProps = {
@@ -40,6 +42,8 @@ class Mask extends React.Component {
4042
in: 'pulse',
4143
out: 'zoomOut',
4244
},
45+
style: {},
46+
className: '',
4347
};
4448

4549
state = {
@@ -80,6 +84,8 @@ class Mask extends React.Component {
8084
animation,
8185
overlayProps,
8286
timeoutId,
87+
className,
88+
style,
8389
...others
8490
} = this.props;
8591
/* eslint-enable */
@@ -102,7 +108,8 @@ class Mask extends React.Component {
102108
type={type}
103109
shape="toast"
104110
title={title}
105-
className={`${prefix}message-wrapper`}
111+
style={style}
112+
className={`${prefix}message-wrapper ${className}`}
106113
onClose={this.handleClose}
107114
>
108115
{content}

0 commit comments

Comments
 (0)