2023-07-15 17:46:19 +03:00
|
|
|
interface NavigationButtonProps {
|
|
|
|
icon: React.ReactNode
|
|
|
|
description: string
|
|
|
|
colorClass?: string
|
|
|
|
onClick: () => void
|
|
|
|
}
|
|
|
|
|
|
|
|
const defaultColors = 'text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white'
|
|
|
|
|
2023-07-25 20:27:29 +03:00
|
|
|
function NavigationButton({ icon, description, colorClass = defaultColors, onClick }: NavigationButtonProps) {
|
2023-07-15 17:46:19 +03:00
|
|
|
return (
|
|
|
|
<button title={description}
|
|
|
|
type='button'
|
|
|
|
onClick={onClick}
|
2023-07-20 17:11:03 +03:00
|
|
|
className={'min-w-fit p-2 mr-1 focus:ring-4 rounded-lg focus:ring-gray-300 dark:focus:ring-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 ' + colorClass}
|
2023-07-15 17:46:19 +03:00
|
|
|
>
|
|
|
|
{icon}
|
|
|
|
</button>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2023-07-25 20:27:29 +03:00
|
|
|
export default NavigationButton;
|