diff --git a/src/components/toast/Toast.d.ts b/src/components/toast/Toast.d.ts index 2dfa97a96e..0924ea9685 100644 --- a/src/components/toast/Toast.d.ts +++ b/src/components/toast/Toast.d.ts @@ -14,6 +14,10 @@ export interface ToastMessage { closable?: boolean; sticky?: boolean; life?: number; + className?: string; + style?: object; + contentClassName: string; + contentStyle?: object; } export interface ToastProps { diff --git a/src/components/toast/ToastMessage.js b/src/components/toast/ToastMessage.js index bbcf7f17ce..e531072f08 100644 --- a/src/components/toast/ToastMessage.js +++ b/src/components/toast/ToastMessage.js @@ -94,18 +94,22 @@ class ToastMessageComponent extends Component { render() { const severity = this.props.message.severity; + const contentClassName = this.props.message.contentClassName; + const contentStyle = this.props.message.contentStyle; + const style = this.props.message.style; + const className = classNames('p-toast-message', { 'p-toast-message-info': severity === 'info', 'p-toast-message-warn': severity === 'warn', 'p-toast-message-error': severity === 'error', 'p-toast-message-success': severity === 'success' - }); + }, this.props.message.className); const message = this.renderMessage(); const closeIcon = this.renderCloseIcon(); return ( -