title: How we can close the error messagebar of office react fabric component?
body: <p>I am trying to use fabric react messageBar component in my application but i am not able to close(dismiss) the message section even i clicked on close icon in the messageBar component.</p>
  
  <p>Please find the below code for reference.</p>
  
  <pre><code>import React from 'react'
  import { MessageBar, MessageBarType } from 'office-ui-fabric-react/lib-commonjs/MessageBar'
  
  class MyMessage extends React.Component{
  
      log=(event)=&gt;{
          console.log('close on test');
  
      }
  
      render(){      
  
          return(
           &lt;div&gt; 
              &lt;MessageBar
              componentRef={(messageBar)=&gt;{this.errorMsgBar = messageBar}}
        messageBarType={MessageBarType.error}
        isMultiline={false}
        onDismiss={(event)=&gt; this.log(event)}
        dismissButtonAriaLabel="Close"
      &gt;
        Error lorem ipsum dolor sit amet, a elit sem interdum consectetur adipiscing elit.{' '}
  
      &lt;/MessageBar&gt;
  &lt;/div&gt;
  
          )
      }
  }
  
  
  export default MyMessage;
  </code></pre>
  
  <p>Office fabric will as default close functionality or do i need to close it ?</p>
  
  <p>If i need to close it please let me know how we can do that?</p>
  
  <p>thanks in advance.</p>
  
  <p>-Nagaraju</p>