diff --git a/frontend/src/lib/components/IconButton.svelte b/frontend/src/lib/components/IconButton.svelte
index 6826f05..08a1852 100644
--- a/frontend/src/lib/components/IconButton.svelte
+++ b/frontend/src/lib/components/IconButton.svelte
@@ -2,23 +2,36 @@
import type { Snippet } from 'svelte';
import type { HTMLButtonAttributes } from 'svelte/elements';
- // Shared square icon button — extracted from five near-identical
- // `.icon-btn` copies (collections, manga edit, upload, the chapter-pages
- // editor) so the size, hover, and variant treatment live in one place.
- // Callers pass the lucide icon as the child and any button attributes
- // (onclick, disabled, aria-label, title, data-testid) straight through.
+ // Shared square icon button — extracted from the near-identical
+ // `.icon-btn` copies across the app so the size, hover, and variant
+ // treatment live in one place. Callers pass the lucide icon as the child
+ // and any button attributes (onclick, disabled, aria-label, title,
+ // data-testid) straight through. `size`/`radius` cover the two larger
+ // header/search buttons without forcing the 32px default everywhere.
type Variant = 'plain' | 'primary' | 'danger';
let {
variant = 'plain',
+ size = 32,
+ radius = 'sm',
children,
...rest
- }: { variant?: Variant; children: Snippet } & HTMLButtonAttributes = $props();
+ }: {
+ variant?: Variant;
+ size?: number;
+ radius?: 'sm' | 'md';
+ children: Snippet;
+ } & HTMLButtonAttributes = $props();
-
+
{:else}
Login
{#if authConfig.self_register_enabled}
@@ -348,24 +349,6 @@
padding: 0 var(--space-2);
}
- .icon-btn {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- width: 36px;
- height: 36px;
- padding: 0;
- background: transparent;
- color: var(--text-muted);
- border: 1px solid transparent;
- border-radius: var(--radius-md);
- }
-
- .icon-btn:hover:not(:disabled) {
- background: var(--surface-elevated);
- color: var(--text);
- }
-
.logging-out {
font-size: var(--font-base);
line-height: 1;
diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte
index 683dea9..b6b8209 100644
--- a/frontend/src/routes/+page.svelte
+++ b/frontend/src/routes/+page.svelte
@@ -27,6 +27,7 @@
import Pager from '$lib/components/Pager.svelte';
import SegmentedControl from '$lib/components/SegmentedControl.svelte';
import Sheet from '$lib/components/Sheet.svelte';
+ import IconButton from '$lib/components/IconButton.svelte';
import Search from '@lucide/svelte/icons/search';
import SlidersHorizontal from '@lucide/svelte/icons/sliders-horizontal';
import ArrowUpDown from '@lucide/svelte/icons/arrow-up-down';
@@ -467,9 +468,16 @@
placeholder="Search by title or author"
data-testid="search-input"
/>
-
+
-
+