blob: 5aa0f16db0c41f187fc6bc842b16a3683a18a2ab [file] [log] [blame]
Israel Lavi1994c982018-05-21 17:42:00 +03001import React from 'react';
2
3class Tab extends React.Component {
4 render() {
5 const {activeTab, tabId, title, onClick, disabled, className = ''} = this.props;
6 const dataTestId = this.props['data-test-id'];
7 return (
8 <li
9 className={`sdc-tab ${activeTab === tabId ? 'sdc-tab-active' : ''} ${className}`}
10 onClick={!disabled && onClick}
11 data-test-id={dataTestId}
12 role='tab'
13 disabled={disabled}>
14 {title}
15 </li>
16 );
17 }
18}
19
20export default Tab;