Skip to content

Commit 37dedc5

Browse files
author
abrulic
committed
UI fixes
1 parent fbb4d7a commit 37dedc5

31 files changed

+143
-125
lines changed

docs/app/components/backdrop.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { cn } from "~/utils/css"
22

3-
export const Backdrop = ({ onClose }: { onClose: () => void }) => (
3+
export const Backdrop = ({ onClose, className }: { onClose: () => void, className?: string }) => (
44
// biome-ignore lint/a11y/useKeyWithClickEvents: We don't need keyboard events for backdrop
55
<div
6-
className={cn("fixed inset-0 bg-[var(--color-modal-backdrop)] backdrop-blur-sm transition-opacity duration-200 z-50")}
6+
className={cn("fixed inset-0 bg-[var(--color-modal-backdrop)] backdrop-blur-sm transition-opacity duration-200 z-50", className)}
77
onClick={(e) => {
88
if (e.target === e.currentTarget) {
99
onClose()

docs/app/components/code-block/code-block-elements.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const PreElement = ({ lines, className = "", ...props }: PreElementProps)
5757
<pre
5858
{...props}
5959
className={cn(
60-
"scrollbar scrollbar-thin relative overflow-x-auto rounded-lg border border-[var(--color-border)] bg-[var(--color-code-block-bg)] py-4 font-mono text-[var(--color-code-block-text)] text-xs leading-relaxed sm:text-sm md:text-base [&::-webkit-scrollbar-thumb:hover]:cursor-pointer",
60+
"scrollbar scrollbar-thin relative overflow-x-auto rounded-lg border border-[var(--color-border)] bg-[var(--color-code-block-bg)] py-4 font-mono text-[var(--color-code-block-text)] leading-relaxed text-sm md:text-base [&::-webkit-scrollbar-thumb:hover]:cursor-pointer",
6161
className
6262
)}
6363
>

docs/app/components/code-block/copy-button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const CopyButton = ({ lines }: { lines: string[] }) => {
2424
onClick={handleCopy}
2525
disabled={disabled}
2626
className={cn(
27-
"absolute top-3 right-3 flex items-center gap-1 rounded px-2 py-1 text-xs transition-all sm:text-sm md:text-base",
27+
"absolute top-3 right-3 flex items-center gap-1 rounded px-2 py-1 transition-all text-sm md:text-base",
2828
"bg-[var(--color-code-copy-bg)] text-[var(--color-code-copy-text)]",
2929
"opacity-0 group-hover:opacity-100",
3030
!disabled && "hover:bg-[var(--color-code-copy-hover-bg)]",

docs/app/components/command-k/components/command-k.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export const CommandK = ({ placeholder, version }: CommandPaletteProps) => {
126126
}}
127127
placeholder={searchPlaceholder}
128128
/>
129-
<div className="max-h-96 overflow-y-auto overscroll-contain" aria-label={searchPlaceholder}>
129+
<div className="max-h-96 overflow-y-auto overscroll-contain scrollbar" aria-label={searchPlaceholder}>
130130
{renderBody()}
131131
</div>
132132
<ResultsFooter resultsCount={results.length} query={query} />

docs/app/components/command-k/components/empty-state.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const EmptyState = ({ query }: { query?: string }) => {
1818
return (
1919
<div className="space-y-6 px-4 py-8 text-center">
2020
<p className="mb-4 font-medium text-[var(--color-empty-text)]">{t("text.start_typing_to_search")}</p>
21-
<div className="flex items-center justify-center gap-6 text-[var(--color-empty-text-muted)] text-xs">
21+
<div className="flex items-center justify-center gap-6 text-[var(--color-empty-text-muted)] text-sm">
2222
<KeyboardHint keys={["↑", "↓"]} label={t("controls.navigate")} />
2323
<KeyboardHint keys="↵" label={t("controls.select")} />
2424
<KeyboardHint keys="⇥" label={t("controls.cycle")} />

docs/app/components/command-k/components/results-footer-note.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next"
33
export const ResultsFooterNote = () => {
44
const { t } = useTranslation()
55
return (
6-
<span className="text-[var(--color-footer-text)] text-xs opacity-70">
6+
<span className="text-[var(--color-footer-text)] text-sm opacity-70">
77
{t("p.search_by")}{" "}
88
<span className="font-semibold">
99
<a href="https://www.forge42.dev/" target="_blank" rel="noopener noreferrer">

docs/app/components/command-k/components/results-footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const ResultsFooter = ({
1515

1616
return (
1717
<div className={cn("border-[var(--color-footer-border)] border-t bg-[var(--color-footer-bg)] px-4 py-3")}>
18-
<div className="flex items-center justify-between text-xs">
18+
<div className="flex items-center justify-between text-sm">
1919
<span className="font-medium text-[var(--color-footer-text)]">{t("text.result", { count: resultsCount })}</span>
2020
<div className="flex items-center gap-4 text-[var(--color-footer-text)]">
2121
<KeyboardHint keys={["↑", "↓"]} label={t("controls.navigate")} />

docs/app/components/command-k/components/search-history.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const ClearHistoryButton = ({ onClear }: Pick<SearchHistoryProps, "onClear">) =>
3535
type="button"
3636
onClick={onClear}
3737
className={cn(
38-
"flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors",
38+
"flex items-center gap-1 rounded px-2 py-1 text-sm",
3939
"text-[var(--color-result-meta)] hover:bg-[var(--color-history-clear-hover-bg)] hover:text-[var(--color-history-clear-hover-text)]"
4040
)}
4141
title="Clear history"

docs/app/components/command-k/components/search-input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function SearchInput({ value, onChange, placeholder, ref }: SearchInputPr
3535
<div className="flex items-center gap-2">
3636
<kbd
3737
className={cn(
38-
"hidden rounded border border-[var(--color-kbd-border)] bg-[var(--color-kbd-bg)] px-2 py-1 font-mono text-xs sm:block",
38+
"hidden rounded border-[var(--color-kbd-border)] bg-[var(--color-kbd-bg)] px-2 py-1 font-mono text-sm sm:block",
3939
"text-[var(--color-kbd-text)]"
4040
)}
4141
>

docs/app/components/command-k/components/search-result.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const ResultIcon = ({
2222
return (
2323
<div
2424
className={cn(
25-
"mt-0.5 transition-colors duration-150",
25+
"mt-0.5 transition-transform duration-150",
2626
isSelected ? "text-[var(--color-result-icon-selected)]" : "text-[var(--color-result-icon)]"
2727
)}
2828
>
@@ -42,7 +42,7 @@ const ResultTitle = ({
4242
}) => (
4343
<div
4444
className={cn(
45-
"font-medium leading-snug transition-colors duration-150",
45+
"font-medium leading-snug transition-transform duration-150",
4646
isSelected ? "text-[var(--color-result-selected-text)]" : "text-[var(--color-result-text)]"
4747
)}
4848
>
@@ -52,7 +52,7 @@ const ResultTitle = ({
5252
)
5353

5454
const ResultMetadata = ({ item, matchType }: Pick<SearchResultProps, "item" | "matchType">) => (
55-
<div className="mt-2 text-[var(--color-breadcrumb-text)] text-xs">
55+
<div className="mt-2 text-[var(--color-breadcrumb-text)] text-sm">
5656
{item.title}
5757
{matchType === "paragraph" && item.subtitle ? <span> &gt; {item.subtitle}</span> : null}
5858
</div>

0 commit comments

Comments
 (0)