tahamajs/IE / Projects /front /src /components /command-palette /CommandPaletteTrigger.tsx
tahamajs's picture
download
raw
985 Bytes
// src/components/command-palette/CommandPaletteTrigger.tsx
import { useCommandPalette } from "./CommandPaletteProvider";
import { Command } from "lucide-react";
interface CommandPaletteTriggerProps {
className?: string;
}
export function CommandPaletteTrigger({ className = "" }: CommandPaletteTriggerProps) {
const { open } = useCommandPalette();
return (
<button
onClick={open}
className={`flex items-center gap-2 rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 px-3 py-1.5 text-sm text-gray-500 hover:bg-gray-50 dark:hover:bg-gray-700 transition ${className}`}
>
<Command className="h-4 w-4" />
<span>Search...</span>
<kbd className="ml-auto hidden text-xs text-gray-400 sm:inline-flex gap-1">
<span className="rounded bg-gray-100 dark:bg-gray-700 px-1.5 py-0.5">⌘</span>
<span className="rounded bg-gray-100 dark:bg-gray-700 px-1.5 py-0.5">K</span>
</kbd>
</button>
);
}

Xet Storage Details

Size:
985 Bytes
·
Xet hash:
41c32ae2e4ab70902e45e9fe68baa38be2f7c83ddc37f9d3cd6c1e01766f5c93

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.