Skip to content

Commit

Permalink
feat: add source code item
Browse files Browse the repository at this point in the history
  • Loading branch information
remvze committed Feb 24, 2024
1 parent 79afb8d commit d055e66
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/components/menu/item/item.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
height: 40px;
padding: 0 12px;
font-size: var(--font-sm);
font-weight: 500;
line-height: 1;
color: var(--color-foreground-subtle);
text-align: left;
Expand Down
1 change: 1 addition & 0 deletions src/components/menu/items/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export { Shuffle as ShuffleItem } from './shuffle';
export { Share as ShareItem } from './share';
export { Donate as DonateItem } from './donate';
export { Notepad as NotepadItem } from './notepad';
export { Source as SourceItem } from './source';
13 changes: 13 additions & 0 deletions src/components/menu/items/source.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { LuGithub } from 'react-icons/lu/index';

import { Item } from '../item';

export function Source() {
return (
<Item
href="https://github.com/remvze/moodist"
icon={<LuGithub />}
label="Source Code"
/>
);
}
9 changes: 8 additions & 1 deletion src/components/menu/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ import {
FloatingFocusManager,
} from '@floating-ui/react';

import { ShuffleItem, ShareItem, DonateItem, NotepadItem } from './items';
import {
ShuffleItem,
ShareItem,
DonateItem,
NotepadItem,
SourceItem,
} from './items';
import { Divider } from './divider';
import { ShareLinkModal } from '@/components/modals/share-link';
import { Notepad } from '@/components/toolbox';
Expand Down Expand Up @@ -83,6 +89,7 @@ export function Menu() {
<NotepadItem open={() => setShowNotepad(true)} />
<Divider />
<DonateItem />
<SourceItem />
</motion.div>
</div>
</FloatingFocusManager>
Expand Down

0 comments on commit d055e66

Please sign in to comment.