mirror of
https://github.com/dylanbenzi/yellowbird.git
synced 2026-11-27 01:07:01 +00:00
added menu and icons
This commit is contained in:
Generated
+2371
-2983
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg width="100%" height="100%" viewBox="0 0 6483 1738" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"><g><path d="M1569.48,716.554l-0,-716.554l247.604,0l0,1304.17l-247.604,-0l-0,-465.446l8.959,-3.439c11.035,-4.236 17.596,-15.622 15.726,-27.294c-5.096,-31.81 -13.449,-62.394 -24.685,-91.434Z" style="fill:#1a1b20;"/><path d="M724.831,1027.33l-0,285.265l-0.678,-0c0,234.721 -190.279,425 -425,425c-62.286,0 -123.812,-13.691 -180.221,-40.104l104.897,-224.027c23.576,11.04 49.291,16.762 75.324,16.762c98.103,-0 177.631,-79.528 177.631,-177.631l0.443,-0l-0,-10.216c-17.116,2.097 -34.545,3.177 -52.227,3.177c-234.721,0 -425,-190.279 -425,-425l0,-426.386l247.604,-0l0,426.386l-0.235,0c0,98.103 79.528,177.631 177.631,177.631c18.176,-0 35.714,-2.73 52.227,-7.802l-0,-596.215l247.604,-0l-0,276.84c-16.196,46.404 -25,96.262 -25,148.16c-0,51.898 8.804,101.756 25,148.16Z" style="fill:#1a1b20;"/><path d="M2125.42,1024.35l0,279.822l-247.604,-0l-0,-1304.17l247.604,0l0,733.988c-15.539,45.556 -23.971,94.39 -23.971,145.179c0,50.788 8.432,99.622 23.971,145.178Z" style="fill:#1a1b20;"/><path d="M4908.12,733.988l-0,-279.821l247.604,-0l0,850l-247.604,-0l-0,-279.822c15.539,-45.556 23.971,-94.39 23.971,-145.178c0,-50.789 -8.432,-99.623 -23.971,-145.179Z" style="fill:#1a1b20;"/><path d="M5641.96,705.18c-11.693,-2.406 -23.682,-3.644 -35.799,-3.644c-98.103,-0 -177.631,79.528 -177.631,177.631c0.003,3.056 0.235,425 0.235,425l-247.604,-0l-0,-425c-0,-234.721 190.279,-425 425,-425c70.864,-0 139.904,17.698 201.21,50.647c-73.027,48.828 -130.996,118.448 -165.411,200.366Z" style="fill:#1a1b20;"/><path d="M2975.42,728.092l0,-273.925l247.605,-0c-0,-0 -0.232,444.04 -0.236,447.096c0,59.866 0.236,147.466 78.591,147.466c78.59,0 78.59,-87.6 78.59,-147.466c-0.003,-3.056 -0.235,-447.096 -0.235,-447.096l247.605,-0l-0,447.096c-0,5.706 -0.058,11.353 -0.171,16.942c0.625,58.139 7.299,130.524 78.526,130.524c78.59,0 78.59,-87.6 78.59,-147.466c-0.003,-3.056 -0.235,-447.096 -0.235,-447.096l247.604,-0l0,447.096c0,265.713 -123.802,405.76 -325.959,402.86c-80.152,-1.151 -147.95,-22.948 -200.59,-65.4c-53.107,44.392 -122.016,66.572 -203.725,65.4c-173.207,-2.486 -288.894,-101.39 -318.476,-296.792c12.066,-40.625 18.545,-83.644 18.545,-128.164c0,-52.987 -9.178,-103.846 -26.029,-151.075Zm0.031,180.4c-0.02,-2.399 -0.031,-4.808 -0.031,-7.229l0,-51.869c0.682,9.837 1.029,19.764 1.029,29.773c0,9.856 -0.336,19.635 -0.998,29.325Z" style="fill:#1a1b20;"/><path d="M4057.09,879.167l0,-879.167l247.604,0l0,492.903c54.001,-24.866 114.091,-38.736 177.396,-38.736c234.564,-0 425,190.436 425,425c0,234.564 -190.436,425 -425,425c-63.305,-0 -123.395,-13.871 -177.396,-38.736c-146.088,-67.269 -247.604,-215.005 -247.604,-386.264Zm247.604,9.212c4.801,93.763 82.449,168.419 177.396,168.419c98.037,-0 177.631,-79.594 177.631,-177.631c-0,-98.038 -79.594,-177.631 -177.631,-177.631c-94.947,-0 -172.595,74.655 -177.396,168.418l0,18.425Z" style="fill:#1a1b20;"/><path d="M2551.45,454.167c234.564,-0 425,190.436 425,425c0,234.564 -190.436,425 -425,425c-234.564,-0 -425,-190.436 -425,-425c0,-234.564 190.436,-425 425,-425Zm0,247.592c97.914,-0 177.408,79.494 177.408,177.408c0,97.914 -79.494,177.408 -177.408,177.408c-97.914,-0 -177.408,-79.494 -177.408,-177.408c0,-97.914 79.494,-177.408 177.408,-177.408Z" style="fill:#1a1b20;"/><circle cx="5031.92" cy="283.333" r="137.5" style="fill:#1a1b20;"/><path d="M6482.04,879.167l-0,-879.167l-247.605,0l0,492.903c-54,-24.866 -114.091,-38.736 -177.395,-38.736c-234.564,-0 -425,190.436 -425,425c-0,234.564 190.436,425 425,425c63.304,-0 123.395,-13.871 177.395,-38.736c146.089,-67.269 247.605,-215.005 247.605,-386.264Zm-247.605,9.212c-4.8,93.763 -82.448,168.419 -177.395,168.419c-98.038,-0 -177.631,-79.594 -177.631,-177.631c-0,-98.038 79.593,-177.631 177.631,-177.631c94.947,-0 172.595,74.655 177.395,168.418l0,18.425Z" style="fill:#1a1b20;"/><path d="M1037.26,1016.25c30.636,25.195 69.852,40.33 112.575,40.33c61.586,-0 118.766,-31.94 151.061,-84.38l210.821,129.831c-77.364,125.625 -214.345,202.141 -361.882,202.141c-234.564,-0 -425,-190.436 -425,-425c-0,-234.564 190.436,-425 425,-425c208.771,-0 386.628,151.633 419.65,357.776l-532.225,204.302Zm226.813,-272.81c-31.057,-26.141 -71.064,-41.676 -114.238,-41.676c-89.63,-0 -163.825,66.611 -175.738,152.987l289.976,-111.311Z" style="fill:#1a1b20;"/></g></svg>
|
||||
|
After Width: | Height: | Size: 4.5 KiB |
+5
-3
@@ -22,7 +22,7 @@ export default function RootLayout({
|
||||
<html lang="en">
|
||||
<body
|
||||
className={cn(
|
||||
"h-[calc(100vh-64px)] antialiased bg-background flex flex-col pl-[300px]",
|
||||
"h-screen antialiased bg-background flex items-start justify-between",
|
||||
red_hat.className
|
||||
)}
|
||||
>
|
||||
@@ -33,8 +33,10 @@ export default function RootLayout({
|
||||
disableTransitionOnChange
|
||||
>
|
||||
<Sidebar />
|
||||
<Navbar />
|
||||
{children}
|
||||
<main className="w-full h-full">
|
||||
<Navbar />
|
||||
{children}
|
||||
</main>
|
||||
</ThemeProvider>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -21,7 +21,11 @@ const Navbar = () => {
|
||||
router.push(`/symbol/${inputValue}`);
|
||||
};
|
||||
|
||||
return <div className="h-16 border-b border-neutral-700 flex">Nav</div>;
|
||||
return (
|
||||
<div className="h-16 border-b border-neutral-700 flex w-full flex-col">
|
||||
Nav
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Navbar;
|
||||
|
||||
@@ -1,12 +1,154 @@
|
||||
"use client";
|
||||
|
||||
import Image from "next/image";
|
||||
import React from "react";
|
||||
import React, { useState } from "react";
|
||||
import { Button } from "../ui/button";
|
||||
import { cn } from "@/lib/utils";
|
||||
import {
|
||||
ArrowLeftRightIcon,
|
||||
ArrowLeftToLineIcon,
|
||||
ArrowRightToLine,
|
||||
ArrowRightToLineIcon,
|
||||
CalendarIcon,
|
||||
CircleDollarSignIcon,
|
||||
FileTextIcon,
|
||||
LayoutGridIcon,
|
||||
LineChartIcon,
|
||||
LogOutIcon,
|
||||
Mail,
|
||||
PersonStanding,
|
||||
PersonStandingIcon,
|
||||
RocketIcon,
|
||||
Settings,
|
||||
} from "lucide-react";
|
||||
import {
|
||||
Command,
|
||||
CommandEmpty,
|
||||
CommandGroup,
|
||||
CommandInput,
|
||||
CommandItem,
|
||||
CommandList,
|
||||
CommandSeparator,
|
||||
CommandShortcut,
|
||||
} from "../ui/command";
|
||||
|
||||
function Sidebar() {
|
||||
const [isCollapsed, setIsCollapsed] = useState<boolean>(false);
|
||||
|
||||
const menuList = [
|
||||
{
|
||||
group: "Navigation",
|
||||
items: [
|
||||
{
|
||||
link: "/dashboard",
|
||||
icon: <LayoutGridIcon />,
|
||||
text: "Dashboard",
|
||||
},
|
||||
{
|
||||
link: "/calendar",
|
||||
icon: <CalendarIcon />,
|
||||
text: "Calendar",
|
||||
},
|
||||
{
|
||||
link: "/porfolio",
|
||||
icon: <LineChartIcon />,
|
||||
text: "Portfolio",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
group: "Apple Inc",
|
||||
items: [
|
||||
{
|
||||
link: "/",
|
||||
icon: <CircleDollarSignIcon />,
|
||||
text: "Earnings",
|
||||
},
|
||||
{
|
||||
link: "/",
|
||||
icon: <ArrowLeftRightIcon />,
|
||||
text: "Insider Trades",
|
||||
},
|
||||
{
|
||||
link: "/",
|
||||
icon: <FileTextIcon />,
|
||||
text: "Filings",
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="w-[275px] border-r border-neutral-700 min-h-screen p-4 fixed">
|
||||
{/* <Image src={"/yellowbird.svg"} height={10} width={120} alt="yellowbird" /> */}
|
||||
<div
|
||||
className={cn(
|
||||
isCollapsed ? "w-[75px]" : "min-w-[300px]",
|
||||
"border-r border-neutral-700 min-h-screen"
|
||||
)}
|
||||
>
|
||||
<div className="flex flex-col min-h-screen p-4">
|
||||
<div className="h-12 pt-1 flex justify-center bg-primary rounded-full">
|
||||
<Image
|
||||
src={"/yellowbird-black.svg"}
|
||||
height={10}
|
||||
width={120}
|
||||
alt="yellowbird"
|
||||
/>
|
||||
</div>
|
||||
<Command className="pt-4 rounded-lg bg-background flex-grow">
|
||||
<CommandList className="max-h-full">
|
||||
{menuList.map((menu: any, key: number) => (
|
||||
<CommandGroup heading={!isCollapsed && menu.group} key={key}>
|
||||
{menu.items.map((option: any, optionKey: number) => (
|
||||
<CommandItem
|
||||
key={optionKey}
|
||||
className="flex gap-2 cursor-pointer p-2"
|
||||
>
|
||||
{option.icon}
|
||||
{!isCollapsed && (
|
||||
<span className="text-base">{option.text}</span>
|
||||
)}
|
||||
</CommandItem>
|
||||
))}
|
||||
</CommandGroup>
|
||||
))}
|
||||
</CommandList>
|
||||
</Command>
|
||||
<Button
|
||||
variant="ghost"
|
||||
onClick={() => {
|
||||
setIsCollapsed(!isCollapsed);
|
||||
}}
|
||||
>
|
||||
{!isCollapsed ? (
|
||||
<ArrowLeftToLineIcon height={20} />
|
||||
) : (
|
||||
<ArrowRightToLineIcon height={20} />
|
||||
)}
|
||||
</Button>
|
||||
<div
|
||||
className={cn(
|
||||
!isCollapsed ? "p-2" : "p-0",
|
||||
"border border-neutral-700 rounded-lg flex"
|
||||
)}
|
||||
>
|
||||
<Button variant="default" className="w-10 h-10">
|
||||
Me
|
||||
</Button>
|
||||
{!isCollapsed && (
|
||||
<>
|
||||
<div className="flex-grow pl-2">
|
||||
<p className="text-sm">Dylan Benzi</p>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
dylanbenzi@gmail.com
|
||||
</p>
|
||||
</div>
|
||||
<Button variant="ghost" className="">
|
||||
<LogOutIcon width={20} height={20} className="text-red-500" />
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
+118
-118
@@ -1,155 +1,155 @@
|
||||
"use client"
|
||||
"use client";
|
||||
|
||||
import * as React from "react"
|
||||
import { type DialogProps } from "@radix-ui/react-dialog"
|
||||
import { Command as CommandPrimitive } from "cmdk"
|
||||
import { Search } from "lucide-react"
|
||||
import * as React from "react";
|
||||
import { type DialogProps } from "@radix-ui/react-dialog";
|
||||
import { Command as CommandPrimitive } from "cmdk";
|
||||
import { Search } from "lucide-react";
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
import { Dialog, DialogContent } from "@/components/ui/dialog"
|
||||
import { cn } from "@/lib/utils";
|
||||
import { Dialog, DialogContent } from "@/components/ui/dialog";
|
||||
|
||||
const Command = React.forwardRef<
|
||||
React.ElementRef<typeof CommandPrimitive>,
|
||||
React.ComponentPropsWithoutRef<typeof CommandPrimitive>
|
||||
React.ElementRef<typeof CommandPrimitive>,
|
||||
React.ComponentPropsWithoutRef<typeof CommandPrimitive>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<CommandPrimitive
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
Command.displayName = CommandPrimitive.displayName
|
||||
<CommandPrimitive
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
));
|
||||
Command.displayName = CommandPrimitive.displayName;
|
||||
|
||||
interface CommandDialogProps extends DialogProps {}
|
||||
|
||||
const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
|
||||
return (
|
||||
<Dialog {...props}>
|
||||
<DialogContent className="overflow-hidden p-0 shadow-lg">
|
||||
<Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
|
||||
{children}
|
||||
</Command>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<Dialog {...props}>
|
||||
<DialogContent className="overflow-hidden p-0 shadow-lg">
|
||||
<Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
|
||||
{children}
|
||||
</Command>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
);
|
||||
};
|
||||
|
||||
const CommandInput = React.forwardRef<
|
||||
React.ElementRef<typeof CommandPrimitive.Input>,
|
||||
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
|
||||
React.ElementRef<typeof CommandPrimitive.Input>,
|
||||
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<div className="flex items-center border-b px-3" cmdk-input-wrapper="">
|
||||
<Search className="mr-2 h-4 w-4 shrink-0 opacity-50" />
|
||||
<CommandPrimitive.Input
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
</div>
|
||||
))
|
||||
<div className="flex items-center border-b px-3" cmdk-input-wrapper="">
|
||||
<Search className="mr-2 h-4 w-4 shrink-0 opacity-50" />
|
||||
<CommandPrimitive.Input
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
</div>
|
||||
));
|
||||
|
||||
CommandInput.displayName = CommandPrimitive.Input.displayName
|
||||
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
||||
|
||||
const CommandList = React.forwardRef<
|
||||
React.ElementRef<typeof CommandPrimitive.List>,
|
||||
React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
|
||||
React.ElementRef<typeof CommandPrimitive.List>,
|
||||
React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<CommandPrimitive.List
|
||||
ref={ref}
|
||||
className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
<CommandPrimitive.List
|
||||
ref={ref}
|
||||
className={cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)}
|
||||
{...props}
|
||||
/>
|
||||
));
|
||||
|
||||
CommandList.displayName = CommandPrimitive.List.displayName
|
||||
CommandList.displayName = CommandPrimitive.List.displayName;
|
||||
|
||||
const CommandEmpty = React.forwardRef<
|
||||
React.ElementRef<typeof CommandPrimitive.Empty>,
|
||||
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>
|
||||
React.ElementRef<typeof CommandPrimitive.Empty>,
|
||||
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>
|
||||
>((props, ref) => (
|
||||
<CommandPrimitive.Empty
|
||||
ref={ref}
|
||||
className="py-6 text-center text-sm"
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
<CommandPrimitive.Empty
|
||||
ref={ref}
|
||||
className="py-6 text-center text-sm"
|
||||
{...props}
|
||||
/>
|
||||
));
|
||||
|
||||
CommandEmpty.displayName = CommandPrimitive.Empty.displayName
|
||||
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
||||
|
||||
const CommandGroup = React.forwardRef<
|
||||
React.ElementRef<typeof CommandPrimitive.Group>,
|
||||
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>
|
||||
React.ElementRef<typeof CommandPrimitive.Group>,
|
||||
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<CommandPrimitive.Group
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
<CommandPrimitive.Group
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
));
|
||||
|
||||
CommandGroup.displayName = CommandPrimitive.Group.displayName
|
||||
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
||||
|
||||
const CommandSeparator = React.forwardRef<
|
||||
React.ElementRef<typeof CommandPrimitive.Separator>,
|
||||
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>
|
||||
React.ElementRef<typeof CommandPrimitive.Separator>,
|
||||
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<CommandPrimitive.Separator
|
||||
ref={ref}
|
||||
className={cn("-mx-1 h-px bg-border", className)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
CommandSeparator.displayName = CommandPrimitive.Separator.displayName
|
||||
<CommandPrimitive.Separator
|
||||
ref={ref}
|
||||
className={cn("-mx-1 h-px bg-neutral-700", className)}
|
||||
{...props}
|
||||
/>
|
||||
));
|
||||
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
||||
|
||||
const CommandItem = React.forwardRef<
|
||||
React.ElementRef<typeof CommandPrimitive.Item>,
|
||||
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>
|
||||
React.ElementRef<typeof CommandPrimitive.Item>,
|
||||
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>
|
||||
>(({ className, ...props }, ref) => (
|
||||
<CommandPrimitive.Item
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
<CommandPrimitive.Item
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
));
|
||||
|
||||
CommandItem.displayName = CommandPrimitive.Item.displayName
|
||||
CommandItem.displayName = CommandPrimitive.Item.displayName;
|
||||
|
||||
const CommandShortcut = ({
|
||||
className,
|
||||
...props
|
||||
className,
|
||||
...props
|
||||
}: React.HTMLAttributes<HTMLSpanElement>) => {
|
||||
return (
|
||||
<span
|
||||
className={cn(
|
||||
"ml-auto text-xs tracking-widest text-muted-foreground",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
CommandShortcut.displayName = "CommandShortcut"
|
||||
return (
|
||||
<span
|
||||
className={cn(
|
||||
"ml-auto text-xs tracking-widest text-muted-foreground",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
};
|
||||
CommandShortcut.displayName = "CommandShortcut";
|
||||
|
||||
export {
|
||||
Command,
|
||||
CommandDialog,
|
||||
CommandInput,
|
||||
CommandList,
|
||||
CommandEmpty,
|
||||
CommandGroup,
|
||||
CommandItem,
|
||||
CommandShortcut,
|
||||
CommandSeparator,
|
||||
}
|
||||
Command,
|
||||
CommandDialog,
|
||||
CommandInput,
|
||||
CommandList,
|
||||
CommandEmpty,
|
||||
CommandGroup,
|
||||
CommandItem,
|
||||
CommandShortcut,
|
||||
CommandSeparator,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user