Skip to content

Conversation

@ComputelessComputer
Copy link
Collaborator

No description provided.

@netlify
Copy link

netlify bot commented Dec 23, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit 27f8a5a
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/694a81f236119e0008490258
😎 Deploy Preview https://deploy-preview-2501--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 23, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 27f8a5a
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/694a81f24b4a660008fdd3c8
😎 Deploy Preview https://deploy-preview-2501--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment on lines +23 to +37
function SearchKbd({ children }: { children: React.ReactNode }) {
return (
<kbd
className={cn([
"pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded px-1 font-mono text-xs font-medium",
"border border-neutral-300",
"bg-linear-to-b from-white to-neutral-100",
"text-neutral-400",
"shadow-[0_1px_0_0_rgba(0,0,0,0.1),inset_0_1px_0_0_rgba(255,255,255,0.8)]",
])}
>
{children}
</kbd>
);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SearchKbd component has two issues:

  1. It uses bg-linear-to-b, which is an invalid Tailwind class (should be bg-gradient-to-b), causing the background gradient to fail.
  2. It does not accept a className prop, preventing the application of responsive utility classes (e.g., hidden sm:inline-flex) that were present in the original code. This causes the keyboard shortcut to be visible on mobile devices where it should be hidden.

Update the component to fix the class name and accept className props, then update the usages to restore the responsive classes.

Suggested change
function SearchKbd({ children }: { children: React.ReactNode }) {
return (
<kbd
className={cn([
"pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded px-1 font-mono text-xs font-medium",
"border border-neutral-300",
"bg-linear-to-b from-white to-neutral-100",
"text-neutral-400",
"shadow-[0_1px_0_0_rgba(0,0,0,0.1),inset_0_1px_0_0_rgba(255,255,255,0.8)]",
])}
>
{children}
</kbd>
);
}
function SearchKbd({ children, className }: { children: React.ReactNode; className?: string }) {
return (
<kbd
className={cn([
"pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded px-1 font-mono text-xs font-medium",
"border border-neutral-300",
"bg-gradient-to-b from-white to-neutral-100",
"text-neutral-400",
"shadow-[0_1px_0_0_rgba(0,0,0,0.1),inset_0_1px_0_0_rgba(255,255,255,0.8)]",
className,
])}
>
{children}
</kbd>
);
}

Spotted by Graphite Agent

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

This comment came from an experimental review—please leave feedback if it was helpful/unhelpful. Learn more about experimental comments here.

@ComputelessComputer ComputelessComputer merged commit a4854d5 into main Dec 24, 2025
10 checks passed
@ComputelessComputer ComputelessComputer deleted the feat/custom-search-kbd-component branch December 24, 2025 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants