All files / src/shared/ui/buttons/TopMenuTabButton TopMenuTabButton.tsx

100% Statements 1/1
100% Branches 2/2
100% Functions 1/1
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27                14x                                    
import React from 'react';
 
interface TopMenuTabButtonProps {
	label: string;
	onClick: () => void;
	isActive: boolean;
}
 
export const TopMenuTabButton = React.memo(function TopMenuTabButton({
	label,
	onClick,
	isActive,
}: TopMenuTabButtonProps) {
	return (
		<button
			onClick={onClick}
			className={`
				text-sm font-medium capitalize
				transition cursor-pointer select-none
				${isActive ? 'text-indigo-600' : 'hover:text-indigo-600 text-gray-800'}
			`}
		>
			{label}
		</button>
	);
});