Skip to content

Commit

Permalink
chore: add placeholder on cmdk
Browse files Browse the repository at this point in the history
  • Loading branch information
luizakp committed Feb 8, 2024
1 parent 52f9e00 commit cfb3c40
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/Cmdk.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ import {
} from "@/components/ui";
import { cn } from "@/lib/utils";

export function CommandMenu({ commands, ...props }) {
export function CommandMenu({
commands,
placeholder = "Busca global",
...props
}) {
const navigate = useNavigate();
const [open, setOpen] = React.useState(false);

Expand Down Expand Up @@ -45,7 +49,7 @@ export function CommandMenu({ commands, ...props }) {
onClick={() => setOpen(true)}
{...props}
>
<span className="inline-flex">Busca global</span>
<span className="inline-flex">{placeholder}</span>
<kbd className="bg-muted top- pointer-events-none absolute right-1.5 hidden h-5 select-none items-center gap-1 rounded border px-1.5 font-mono text-[10px] font-medium opacity-100 sm:flex">
<span className="text-xs"></span>K
</kbd>
Expand Down

0 comments on commit cfb3c40

Please sign in to comment.