diff --git a/src/components/menu/item/item.module.css b/src/components/menu/item/item.module.css index 4e7ab13..1f3083b 100644 --- a/src/components/menu/item/item.module.css +++ b/src/components/menu/item/item.module.css @@ -10,6 +10,7 @@ line-height: 1; color: var(--color-foreground-subtle); text-align: left; + text-decoration: none; cursor: pointer; background-color: transparent; border: 1px solid var(--color-neutral-200); diff --git a/src/components/menu/item/item.tsx b/src/components/menu/item/item.tsx index 32b2a94..e401693 100644 --- a/src/components/menu/item/item.tsx +++ b/src/components/menu/item/item.tsx @@ -1,16 +1,30 @@ import styles from './item.module.css'; interface ItemProps { - disabled: boolean; + disabled?: boolean; + href?: string; icon: React.ReactElement; label: string; - onClick: () => void; + onClick?: () => void; } -export function Item({ disabled = false, icon, label, onClick }: ItemProps) { +export function Item({ + disabled = false, + href, + icon, + label, + onClick = () => {}, +}: ItemProps) { + const Comp = href ? 'a' : 'button'; + return ( - + ); } diff --git a/src/components/menu/items/donate.tsx b/src/components/menu/items/donate.tsx new file mode 100644 index 0000000..9b647e7 --- /dev/null +++ b/src/components/menu/items/donate.tsx @@ -0,0 +1,13 @@ +import { SiBuymeacoffee } from 'react-icons/si/index'; + +import { Item } from '../item'; + +export function Donate() { + return ( + } + label="Buy Me a Coffe" + /> + ); +} diff --git a/src/components/menu/items/index.ts b/src/components/menu/items/index.ts index 7872105..63eaf2f 100644 --- a/src/components/menu/items/index.ts +++ b/src/components/menu/items/index.ts @@ -1,2 +1,3 @@ export { Shuffle as ShuffleItem } from './shuffle'; export { Share as ShareItem } from './share'; +export { Donate as DonateItem } from './donate'; diff --git a/src/components/menu/menu.tsx b/src/components/menu/menu.tsx index 3f68d40..f9470f7 100644 --- a/src/components/menu/menu.tsx +++ b/src/components/menu/menu.tsx @@ -14,7 +14,7 @@ import { FloatingFocusManager, } from '@floating-ui/react'; -import { ShuffleItem, ShareItem } from './items'; +import { ShuffleItem, ShareItem, DonateItem } from './items'; import { ShareLinkModal } from '@/components/modals/share-link'; import { slideY, fade, mix } from '@/lib/motion'; @@ -76,6 +76,7 @@ export function Menu() { > setShowShareLink(true)} /> +