src/components/toast/toast.component.js
/** Content rendered for the toast. */
Content rendered for the toast.
Content rendered for the toast .
toastContent() {
    if (this.props.open) {
      return (
        <CSSTransition
          enter
          classNames='toast'
          timeout={ { appear: 1600, enter: 1500, exit: 500 } }
        >
          <ToastStyle
            isCenter={ this.props.isCenter }
            variant={ this.props.variant || this.props.as }
            className={ this.componentClasses }
            { ...tagComponent((this.props['data-component'] || 'toast'), this.props) }
          >
            <ToastTypeStyle variant={ this.props.variant || this.props.as }>
              <Icon type={ this.props.variant || this.props.as } />
            </ToastTypeStyle>
            <ToastContentStyle
              variant={ this.props.variant || this.props.as }
              isDismiss={ this.props.onDismiss }
            >
              { this.props.children }
            </ToastContentStyle>
            { this.closeIcon() }
          </ToastStyle>
        </CSSTransition>
      );
    }
    return null;
  }
toastContent ( ) { if ( this . props . open ) { return ( < CSSTransition enter classNames = 'toast' timeout = { { appear : 1600 , enter : 1500 , exit : 500 } } > < ToastStyle isCenter = { this . props . isCenter } variant = { this . props . variant || this . props . as } className = { this . componentClasses } { ... tagComponent ( ( this . props [ 'data-component' ] || 'toast' ) , this . props ) } > < ToastTypeStyle variant = { this . props . variant || this . props . as } > < Icon type = { this . props . variant || this . props . as } / > < / ToastTypeStyle > < ToastContentStyle variant = { this . props . variant || this . props . as } isDismiss = { this . props . onDismiss } > { this . props . children } < / ToastContentStyle > { this . closeIcon ( ) } < / ToastStyle > < / CSSTransition > ) ; } return null ; }
Content rendered for the toast.
Content rendered for the toast .