- Update to @tabler/icons-svelte-runes for a more 'Svente 5' experience. - Adjust error handling in load functions, plain error thrown for handling in the error handler. - Fix the warning regarding a click handler attached to an <img> on the About page - Re-organise component directory - Remove unused font declarations from global.css Features: - Add service-worker caching of FilterData API response to allow for filtering to work fully offline -
51 lines
923 B
Svelte
51 lines
923 B
Svelte
<script lang="ts">
|
|
import BaseCard from '$lib/components/ui/cards/BaseCard.svelte';
|
|
import Textbox from '$lib/components/ui/form-elements/Textbox.svelte';
|
|
|
|
let { onsearch }: { onsearch: (c: string) => void } = $props();
|
|
</script>
|
|
|
|
<BaseCard header={'Find by Code'}>
|
|
<div class="card-content">
|
|
<div class="textbox-container">
|
|
<div class="textbox-item-wrapper">
|
|
<Textbox
|
|
placeholder={'Code'}
|
|
uppercase={true}
|
|
type={'text'}
|
|
onsubmit={onsearch}
|
|
maxLength={4}
|
|
inputmode={'numeric'}
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</BaseCard>
|
|
|
|
<style>
|
|
.card-content {
|
|
text-align: center;
|
|
width: 90%;
|
|
margin: auto;
|
|
padding: 10px 0 10px 0;
|
|
}
|
|
|
|
.textbox-container {
|
|
display: flex;
|
|
width: 100%;
|
|
justify-content: center;
|
|
gap: 4rem;
|
|
}
|
|
|
|
.textbox-item-wrapper {
|
|
width: 60%;
|
|
}
|
|
|
|
.button-wrapper {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 1rem;
|
|
margin-top: 15px;
|
|
}
|
|
</style>
|