mirror of
https://github.com/ihatenodejs/aidxnCC.git
synced 2025-04-25 05:55:58 +00:00
feat: icons in buttons
This commit is contained in:
parent
e98a80666f
commit
2ad51ad3d7
@ -4,14 +4,16 @@ import Link from 'next/link';
|
|||||||
interface MusicInfoButtonProps {
|
interface MusicInfoButtonProps {
|
||||||
href: string;
|
href: string;
|
||||||
label: string;
|
label: string;
|
||||||
|
icon?: React.ElementType;
|
||||||
}
|
}
|
||||||
|
|
||||||
const MusicInfoButton: React.FC<MusicInfoButtonProps> = ({ href, label }) => {
|
const MusicInfoButton: React.FC<MusicInfoButtonProps> = ({ href, label, icon }) => {
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
href={href}
|
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}
|
{label}
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import { User } from 'lucide-react'
|
import { User, Smartphone } from 'lucide-react'
|
||||||
import FeaturedRepos from '../widgets/FeaturedRepos'
|
import FeaturedRepos from '../widgets/FeaturedRepos'
|
||||||
import Image from 'next/image'
|
import Image from 'next/image'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
@ -52,6 +52,7 @@ export default function About() {
|
|||||||
<Button
|
<Button
|
||||||
href="/phone"
|
href="/phone"
|
||||||
label="My Phone"
|
label="My Phone"
|
||||||
|
icon={Smartphone}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-12">
|
<div className="mt-12">
|
||||||
|
@ -5,7 +5,7 @@ import Button from '../objects/Button'
|
|||||||
import LastPlayed from '@/components/widgets/LastPlayed'
|
import LastPlayed from '@/components/widgets/LastPlayed'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
import { Mail } from 'lucide-react'
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
@ -62,6 +62,7 @@ export default function Home() {
|
|||||||
<Button
|
<Button
|
||||||
href={'/contact'}
|
href={'/contact'}
|
||||||
label={t('home.contact.button')}
|
label={t('home.contact.button')}
|
||||||
|
icon={Mail}
|
||||||
/>
|
/>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user