Skip to content

Commit

Permalink
Lagt til onKeyUp så diven skal 'fungere' som en button.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole Espen Lundsør committed Nov 29, 2017
1 parent cc875d8 commit cde9b4e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/accordion-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ class AccordionItem extends Component {
className={ createClasses('ffe-accordion-item__toggler', isOpen, type) }
id={ `tab-${uuid}-${index}` }
onClick={ this.onClick }
onKeyUp={event => {
const enterKey = 13;
if (event.keyCode === enterKey) {
this.onClick(event);
}
}}
role="tab"
>
<span className="ffe-accordion-item__toggler-content">
Expand Down

0 comments on commit cde9b4e

Please sign in to comment.