openreplay/frontend/app/components/BugFinder/TabItem/TabItem.js
Shekar Siri 2ed5cac986
Webpack upgrade and dependency cleanup (#523)
* change(ui) - webpack update
* change(ui) - api optimize and other fixes
2022-06-03 16:47:38 +02:00

27 lines
No EOL
850 B
JavaScript

import React from 'react';
import cn from 'classnames';
import { Icon } from 'UI';
import stl from './tabItem.module.css';
const TabItem = ({ icon, label, count, iconColor = 'teal', active = false, leading, ...rest }) => {
return (
<div
className={
count === 0 ? stl.disabled : '',
cn(stl.wrapper,
active ? stl.active : '',
"flex items-center py-2 justify-between")
}
{ ...rest }
>
<div className="flex items-center">
{ icon && <Icon name={ icon } size="16" color={ iconColor } /> }
<span className="ml-3 mr-1">{ label }</span>
{ count && <span>({ count })</span>}
</div>
{ !!leading && leading }
</div>
);
}
export default TabItem;