Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/components/shell/SearchButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ export default function SearchButton({ locale }: Props) {
<>
<button
type="button"
className="hidden lg:flex items-center gap-2 [font-size:13px] text-[color:var(--lb-fg-3)] bg-[var(--lb-bg-2)] border border-transparent rounded-lg cursor-pointer hover:border-[color:var(--app-card-stroke-strong)] w-[220px] h-[32px] px-[10px]"
// lg~xl 之间导航标签 + 220px 输入框放不下(会与 Docs 等标签重叠),
// 收成与 GitHub 按钮一致的 32×32 图标按钮;≥xl 恢复输入框样式。
className="hidden lg:grid xl:flex place-items-center items-center gap-2 w-8 h-8 border border-transparent rounded-lg cursor-pointer [font-size:13px] text-[color:var(--lb-fg-2)] hover:bg-[var(--lb-bg-2)] hover:text-[color:var(--lb-fg-1)] xl:w-[220px] xl:px-[10px] xl:text-[color:var(--lb-fg-3)] xl:bg-[var(--lb-bg-2)] xl:hover:text-[color:var(--lb-fg-3)] xl:hover:border-[color:var(--app-card-stroke-strong)]"
data-lbus-component="search-button"
aria-label={t(locale, 'search.placeholder')}
title={t(locale, 'search.placeholder')}
onClick={() => setOpen(true)}
>
<svg
Expand All @@ -69,9 +72,9 @@ export default function SearchButton({ locale }: Props) {
<circle cx="11" cy="11" r="8" />
<path d="m21 21-4.35-4.35" />
</svg>
<span className="flex-1 text-left">{t(locale, 'search.placeholder')}</span>
<span className="hidden xl:inline flex-1 text-left">{t(locale, 'search.placeholder')}</span>
<kbd
className="ml-auto [font-family:var(--app-mono)] [font-size:11px] leading-[11px] px-[5px] py-[2px] bg-[var(--lb-bg-1)] border border-[color:var(--app-card-stroke)] rounded-[4px] text-[color:var(--lb-fg-3)]"
className="hidden xl:inline ml-auto [font-family:var(--app-mono)] [font-size:11px] leading-[11px] px-[5px] py-[2px] bg-[var(--lb-bg-1)] border border-[color:var(--app-card-stroke)] rounded-[4px] text-[color:var(--lb-fg-3)]"
aria-label="Keyboard shortcut: Command K"
>
<span aria-hidden="true">⌘K</span>
Expand Down
Loading