mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
25 lines
632 B
TypeScript
25 lines
632 B
TypeScript
interface NavigationButtonProps {
|
|
id?: string
|
|
text?: string
|
|
icon: React.ReactNode
|
|
description?: string
|
|
onClick?: () => void
|
|
}
|
|
|
|
function NavigationButton({ id, icon, description, onClick, text }: NavigationButtonProps) {
|
|
return (
|
|
<button id={id}
|
|
title={description}
|
|
type='button'
|
|
onClick={onClick}
|
|
tabIndex={-1}
|
|
className={`flex items-center h-full gap-1 ${text ? 'px-2' : 'px-4'} mr-1 min-w-fit whitespace-nowrap clr-btn-nav`}
|
|
>
|
|
{icon && <span>{icon}</span>}
|
|
{text && <span className='font-semibold'>{text}</span>}
|
|
</button>
|
|
);
|
|
}
|
|
|
|
export default NavigationButton;
|