2023-07-15 17:46:19 +03:00
|
|
|
interface NavigationButtonProps {
|
2023-08-16 10:11:22 +03:00
|
|
|
id?: string
|
2023-08-26 19:39:49 +03:00
|
|
|
text?: string
|
2023-07-15 17:46:19 +03:00
|
|
|
icon: React.ReactNode
|
2023-08-16 10:11:22 +03:00
|
|
|
description?: string
|
|
|
|
onClick?: () => void
|
2023-07-15 17:46:19 +03:00
|
|
|
}
|
|
|
|
|
2023-08-26 19:39:49 +03:00
|
|
|
function NavigationButton({ id, icon, description, onClick, text }: NavigationButtonProps) {
|
2023-07-15 17:46:19 +03:00
|
|
|
return (
|
2023-08-16 10:11:22 +03:00
|
|
|
<button id={id}
|
|
|
|
title={description}
|
2023-07-15 17:46:19 +03:00
|
|
|
type='button'
|
|
|
|
onClick={onClick}
|
2023-08-26 19:39:49 +03:00
|
|
|
className='flex gap-1 p-2 mr-1 rounded-lg min-w-fit whitespace-nowrap clr-btn-nav'
|
2023-07-15 17:46:19 +03:00
|
|
|
>
|
2023-08-26 19:39:49 +03:00
|
|
|
{icon && <span>{icon}</span>}
|
|
|
|
{text && <span className='font-semibold'>{text}</span>}
|
2023-07-15 17:46:19 +03:00
|
|
|
</button>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2023-07-25 20:27:29 +03:00
|
|
|
export default NavigationButton;
|