feat: icons in buttons
This commit is contained in:
parent
e98a80666f
commit
2ad51ad3d7
3 changed files with 9 additions and 5 deletions
|
@ -4,14 +4,16 @@ import Link from 'next/link';
|
|||
interface MusicInfoButtonProps {
|
||||
href: string;
|
||||
label: string;
|
||||
icon?: React.ElementType;
|
||||
}
|
||||
|
||||
const MusicInfoButton: React.FC<MusicInfoButtonProps> = ({ href, label }) => {
|
||||
const MusicInfoButton: React.FC<MusicInfoButtonProps> = ({ href, label, icon }) => {
|
||||
return (
|
||||
<Link
|
||||
<Link
|
||||
href={href}
|
||||
className="inline-block bg-gray-800 text-white font-bold py-2 px-4 rounded-sm shadow-md transition-all duration-300 ease-in-out hover:bg-gray-700 hover:shadow-lg hover:-translate-y-0.5 focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-gray-500"
|
||||
className="inline-flex items-center bg-gray-800 text-white font-bold py-2 px-4 rounded-sm shadow-md transition-all duration-300 ease-in-out hover:bg-gray-700 hover:shadow-lg hover:-translate-y-0.5 focus:outline-hidden focus:ring-2 focus:ring-offset-2 focus:ring-gray-500"
|
||||
>
|
||||
{icon && React.createElement(icon, { size: 20, className: "mr-2" })}
|
||||
{label}
|
||||
</Link>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue