title: Toggle accordion items
body: <p>I have a React Js accordion, when i click an item, the panel opens, to close it you have to click on another item, i need to add the possibility of closing the active panel after clicking the <strong>AccButton</strong></p>
  <p>Here is my code :</p>
  <pre><code>const { active, setActive } = useContext(AccordionContext)
  
  const eventHandler = (e, index) =&gt; {
      e.preventDefault();
      setActive(index);
  }
  
  return (
      &lt;AccItem id={props.index}&gt;
          &lt;AccButton
              onClick={(e) =&gt; eventHandler(e, props.index)}
              aria-expanded={ active === props.index ? 'true' : 'false' }
              aria-disabled={ active === props.index ? 'true' : 'false' }
          &gt;
              &lt;AccItemTitle&gt;
                  {props.description}
              &lt;/AccItemTitle&gt;
          &lt;/AccButton&gt;
  
          &lt;AccPanel elWidth={props.elWidth}&gt;
              &lt;PanelToggle toggle={active === props.index}&gt;&lt;/PanelToggle&gt;
          &lt;/AccPanel&gt;
  
      &lt;/AccItem&gt;
  )
  </code></pre>