Skip to content

Commit

Permalink
feat(Message): toast add style & className prop
Browse files Browse the repository at this point in the history
  • Loading branch information
myronliu347 committed Oct 24, 2019
1 parent 24fe9ac commit 9a58a5e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/message/toast.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -40,6 +42,8 @@ class Mask extends React.Component {
in: 'pulse',
out: 'zoomOut',
},
style: {},
className: '',
};

state = {
Expand Down Expand Up @@ -80,6 +84,8 @@ class Mask extends React.Component {
animation,
overlayProps,
timeoutId,
className,
style,
...others
} = this.props;
/* eslint-enable */
Expand All @@ -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}
Expand Down

0 comments on commit 9a58a5e

Please sign in to comment.