impr: restructure src/lib
This commit is contained in:
376 files changed
+1000
-1033
No files matched your search
@@ -0,0 +1,35 @@
|
||||
<script lang="ts">
|
||||
import { navigating, page } from '$app/state'
|
||||
import { t } from '$lib/app/i18n'
|
||||
import { Button, TextInput } from 'mono-svelte'
|
||||
import { MagnifyingGlass } from 'svelte-hero-icons'
|
||||
|
||||
interface Props {
|
||||
query?: string | null
|
||||
}
|
||||
|
||||
let { query = $bindable() }: Props = $props()
|
||||
|
||||
let searchElement = $state<HTMLInputElement>()
|
||||
</script>
|
||||
|
||||
<div class="flex gap-2 flex-row items-center w-full text-base h-10">
|
||||
<TextInput
|
||||
bind:value={query}
|
||||
bind:element={searchElement}
|
||||
name="q"
|
||||
placeholder={$t('routes.search.query')}
|
||||
size="lg"
|
||||
class="flex-1 rounded-full! h-full text-base!"
|
||||
/>
|
||||
<Button
|
||||
submit
|
||||
color="primary"
|
||||
size="custom"
|
||||
class="shrink-0 h-full aspect-square shadow-md"
|
||||
title="Search"
|
||||
rounding="pill"
|
||||
loading={navigating.to?.route.id == page.url.pathname}
|
||||
icon={MagnifyingGlass}
|
||||
></Button>
|
||||
</div>
|
||||
Reference in new issue
Block a user