34 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Svelte
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Svelte
		
	
	
	
	
	
<script lang="ts">
 | 
						|
    import type { LookupCardConfig } from "$lib/cards/Card.types";
 | 
						|
    import LookupCard from "$lib/cards/LookupCard.svelte";
 | 
						|
    import NearToMeCard from "$lib/cards/NearToMeCard.svelte";
 | 
						|
    import QuickLinkCard from "$lib/cards/QuickLinkCard.svelte";
 | 
						|
 | 
						|
    let LookupConfig: LookupCardConfig = {
 | 
						|
        title: "Live Arr/Dep Boards",
 | 
						|
        helpText: "Enter CRS, TIPLOC or STANOX code to see live departures",
 | 
						|
        placeholder: "Enter CRS/TIPLOC",
 | 
						|
        maxLen: 7,
 | 
						|
        formAction: "/ldb/",
 | 
						|
        fieldName: "station",
 | 
						|
    };
 | 
						|
 | 
						|
    let TimetableConfig: LookupCardConfig = {
 | 
						|
        title: "Timetable & PIS",
 | 
						|
        helpText: "Enter a headcode to search the timetable and check PIS Codes",
 | 
						|
        placeholder: "Enter headcode",
 | 
						|
        maxLen: 4,
 | 
						|
        formAction: "/train/",
 | 
						|
        fieldName: "headcode",
 | 
						|
    };
 | 
						|
 | 
						|
    function onRefresh() {
 | 
						|
        console.log("Refresh");
 | 
						|
    }
 | 
						|
</script>
 | 
						|
 | 
						|
<LookupCard config={LookupConfig} />
 | 
						|
<LookupCard config={TimetableConfig} />
 | 
						|
<NearToMeCard />
 | 
						|
<QuickLinkCard />
 |