-
-
Notifications
You must be signed in to change notification settings - Fork 69
feat(registry) add menubar component #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,191 @@ | ||
| import { Metadata } from "next" | ||
|
|
||
| import { menubarMetaData } from "@/lib/metadata" | ||
| import { | ||
| Menubar, | ||
| MenubarCheckboxItem, | ||
| MenubarContent, | ||
| MenubarItem, | ||
| MenubarMenu, | ||
| MenubarRadioGroup, | ||
| MenubarRadioItem, | ||
| MenubarSeparator, | ||
| MenubarShortcut, | ||
| MenubarSub, | ||
| MenubarSubContent, | ||
| MenubarSubTrigger, | ||
| MenubarTrigger, | ||
| } from "@/components/ui/8bit/menubar" | ||
| import { Separator } from "@/components/ui/separator" | ||
|
|
||
| import CodeSnippet from "../code-snippet" | ||
| import CopyCommandButton from "../copy-command-button" | ||
| import InstallationCommands from "../installation-commands" | ||
| import { OpenInV0Button } from "../open-in-v0-button" | ||
|
|
||
| export const metadata: Metadata = { | ||
| title: "8-bit Menubar", | ||
| description: "Displays an 8-bit menubar component.", | ||
| openGraph: { | ||
| images: menubarMetaData, | ||
| }, | ||
| } | ||
|
|
||
| export default function MenubarPage() { | ||
| return ( | ||
| <div className="flex flex-col gap-4"> | ||
| <div className="flex flex-col md:flex-row items-center justify-between gap-2"> | ||
| <h1 className="text-3xl font-bold">Menubar</h1> | ||
| <CopyCommandButton | ||
| copyCommand={`pnpm dlx shadcn@canary add ${process.env.NEXT_PUBLIC_BASE_URL}/r/8bit-button.json`} | ||
| command={"pnpm dlx shadcn@canary add 8bit-button"} | ||
| /> | ||
| </div> | ||
|
|
||
| <p className="text-muted-foreground"> | ||
| Displays an 8-bit menubar component. | ||
| </p> | ||
|
|
||
| <div className="flex flex-col gap-4 border rounded-lg p-4 min-h-[450px]"> | ||
| <div className="flex items-center justify-between"> | ||
| <h2 className="text-sm text-muted-foreground sm:pl-3"> | ||
| 8-bit menubar component | ||
| </h2> | ||
|
|
||
| <div className="flex items-center gap-2"> | ||
| <OpenInV0Button name="8bit-menubar" className="w-fit" /> | ||
| </div> | ||
| </div> | ||
| <div className="flex items-center justify-center min-h-[400px] relative"> | ||
| <Menubar> | ||
| <MenubarMenu> | ||
| <MenubarTrigger>File</MenubarTrigger> | ||
| <MenubarContent> | ||
| <MenubarItem> | ||
| New Tab <MenubarShortcut>⌘T</MenubarShortcut> | ||
| </MenubarItem> | ||
| <MenubarItem> | ||
| New Window <MenubarShortcut>⌘N</MenubarShortcut> | ||
| </MenubarItem> | ||
| <MenubarItem disabled>New Incognito Window</MenubarItem> | ||
| <MenubarSeparator /> | ||
| <MenubarSub> | ||
| <MenubarSubTrigger>Share</MenubarSubTrigger> | ||
| <MenubarSubContent> | ||
| <MenubarItem>Email link</MenubarItem> | ||
| <MenubarItem>Messages</MenubarItem> | ||
| <MenubarItem>Notes</MenubarItem> | ||
| </MenubarSubContent> | ||
| </MenubarSub> | ||
| <MenubarSeparator /> | ||
| <MenubarItem> | ||
| Print... <MenubarShortcut>⌘P</MenubarShortcut> | ||
| </MenubarItem> | ||
| </MenubarContent> | ||
| </MenubarMenu> | ||
| <MenubarMenu> | ||
| <MenubarTrigger>Edit</MenubarTrigger> | ||
| <MenubarContent> | ||
| <MenubarItem> | ||
| Undo <MenubarShortcut>⌘Z</MenubarShortcut> | ||
| </MenubarItem> | ||
| <MenubarItem> | ||
| Redo <MenubarShortcut>⇧⌘Z</MenubarShortcut> | ||
| </MenubarItem> | ||
| <MenubarSeparator /> | ||
| <MenubarSub> | ||
| <MenubarSubTrigger>Find</MenubarSubTrigger> | ||
| <MenubarSubContent> | ||
| <MenubarItem>Search the web</MenubarItem> | ||
| <MenubarSeparator /> | ||
| <MenubarItem>Find...</MenubarItem> | ||
| <MenubarItem>Find Next</MenubarItem> | ||
| <MenubarItem>Find Previous</MenubarItem> | ||
| </MenubarSubContent> | ||
| </MenubarSub> | ||
| <MenubarSeparator /> | ||
| <MenubarItem>Cut</MenubarItem> | ||
| <MenubarItem>Copy</MenubarItem> | ||
| <MenubarItem>Paste</MenubarItem> | ||
| </MenubarContent> | ||
| </MenubarMenu> | ||
| <MenubarMenu> | ||
| <MenubarTrigger>View</MenubarTrigger> | ||
| <MenubarContent> | ||
| <MenubarCheckboxItem> | ||
| Always Show Bookmarks Bar | ||
| </MenubarCheckboxItem> | ||
| <MenubarCheckboxItem checked> | ||
| Always Show Full URLs | ||
| </MenubarCheckboxItem> | ||
| <MenubarSeparator /> | ||
| <MenubarItem inset> | ||
| Reload <MenubarShortcut>⌘R</MenubarShortcut> | ||
| </MenubarItem> | ||
| <MenubarItem disabled inset> | ||
| Force Reload <MenubarShortcut>⇧⌘R</MenubarShortcut> | ||
| </MenubarItem> | ||
| <MenubarSeparator /> | ||
| <MenubarItem inset>Toggle Fullscreen</MenubarItem> | ||
| <MenubarSeparator /> | ||
| <MenubarItem inset>Hide Sidebar</MenubarItem> | ||
| </MenubarContent> | ||
| </MenubarMenu> | ||
| <MenubarMenu> | ||
| <MenubarTrigger>Profiles</MenubarTrigger> | ||
| <MenubarContent> | ||
| <MenubarRadioGroup value="benoit"> | ||
| <MenubarRadioItem value="andy">Andy</MenubarRadioItem> | ||
| <MenubarRadioItem value="benoit">Benoit</MenubarRadioItem> | ||
| <MenubarRadioItem value="Luis">Luis</MenubarRadioItem> | ||
| </MenubarRadioGroup> | ||
| <MenubarSeparator /> | ||
| <MenubarItem inset>Edit...</MenubarItem> | ||
| <MenubarSeparator /> | ||
| <MenubarItem inset>Add Profile...</MenubarItem> | ||
| </MenubarContent> | ||
| </MenubarMenu> | ||
| </Menubar> | ||
| </div> | ||
| </div> | ||
|
|
||
| <h3 className="text-lg font-bold">Installation</h3> | ||
|
|
||
| <Separator /> | ||
|
|
||
| <InstallationCommands | ||
| packageUrl={`${process.env.NEXT_PUBLIC_BASE_URL}/r/8bit-menubar.json`} | ||
| /> | ||
|
|
||
| <h3 className="text-lg font-bold mt-10">Usage</h3> | ||
|
|
||
| <Separator /> | ||
|
|
||
| <CodeSnippet>{`import { | ||
| Menubar, | ||
| MenubarContent, | ||
| MenubarItem, | ||
| MenubarMenu, | ||
| MenubarSeparator, | ||
| MenubarShortcut, | ||
| MenubarTrigger, | ||
| } from "@/components/ui/8bit/menubar"`}</CodeSnippet> | ||
|
|
||
| <CodeSnippet>{`<Menubar> | ||
| <MenubarMenu> | ||
| <MenubarTrigger>File</MenubarTrigger> | ||
| <MenubarContent> | ||
| <MenubarItem> | ||
| New Tab <MenubarShortcut>⌘T</MenubarShortcut> | ||
| </MenubarItem> | ||
| <MenubarItem>New Window</MenubarItem> | ||
| <MenubarSeparator /> | ||
| <MenubarItem>Share</MenubarItem> | ||
| <MenubarSeparator /> | ||
| <MenubarItem>Print</MenubarItem> | ||
| </MenubarContent> | ||
| </MenubarMenu> | ||
| </Menubar>`}</CodeSnippet> | ||
| </div> | ||
| ) | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorrect component referenced in copy command.
The copy command button is referencing "8bit-button" instead of "8bit-menubar", which doesn't match the component being documented on this page.
📝 Committable suggestion
🤖 Prompt for AI Agents