Lib: Update DriverCard to reflect lib changes (lazy loading)
This commit is contained in:
@ -5,7 +5,7 @@
|
|||||||
import Button from "./Button.svelte";
|
import Button from "./Button.svelte";
|
||||||
import type { Driver } from "$lib/schema";
|
import type { Driver } from "$lib/schema";
|
||||||
import Input from "./Input.svelte";
|
import Input from "./Input.svelte";
|
||||||
import LazyDropdown, { type DropdownOption } from "./LazyDropdown.svelte";
|
import LazyDropdown, { type LazyDropdownOption } from "./LazyDropdown.svelte";
|
||||||
import { DRIVER_HEADSHOT_HEIGHT, DRIVER_HEADSHOT_WIDTH } from "$lib/config";
|
import { DRIVER_HEADSHOT_HEIGHT, DRIVER_HEADSHOT_WIDTH } from "$lib/config";
|
||||||
|
|
||||||
interface DriverCardProps {
|
interface DriverCardProps {
|
||||||
@ -25,7 +25,7 @@
|
|||||||
team_select_value: string;
|
team_select_value: string;
|
||||||
|
|
||||||
/** The options this component's team select dropdown will display */
|
/** The options this component's team select dropdown will display */
|
||||||
team_select_options: DropdownOption[];
|
team_select_options: LazyDropdownOption[];
|
||||||
|
|
||||||
/** The value this component's active switch will bind to */
|
/** The value this component's active switch will bind to */
|
||||||
active_value: boolean;
|
active_value: boolean;
|
||||||
@ -122,6 +122,7 @@
|
|||||||
background="bg-primary-500"
|
background="bg-primary-500"
|
||||||
active="bg-tertiary-500"
|
active="bg-tertiary-500"
|
||||||
bind:checked={active_value}
|
bind:checked={active_value}
|
||||||
|
disabled={disable_inputs}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{#if driver}
|
{#if driver}
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
import Button from "./Button.svelte";
|
import Button from "./Button.svelte";
|
||||||
import type { Driver, Substitution } from "$lib/schema";
|
import type { Driver, Substitution } from "$lib/schema";
|
||||||
import { get_by_value } from "$lib/database";
|
import { get_by_value } from "$lib/database";
|
||||||
import LazyDropdown, { type DropdownOption } from "./LazyDropdown.svelte";
|
import LazyDropdown, { type LazyDropdownOption } from "./LazyDropdown.svelte";
|
||||||
import type { Action } from "svelte/action";
|
import type { Action } from "svelte/action";
|
||||||
import { DRIVER_HEADSHOT_HEIGHT, DRIVER_HEADSHOT_WIDTH } from "$lib/config";
|
import { DRIVER_HEADSHOT_HEIGHT, DRIVER_HEADSHOT_WIDTH } from "$lib/config";
|
||||||
|
|
||||||
@ -33,10 +33,10 @@
|
|||||||
race_select_value: string;
|
race_select_value: string;
|
||||||
|
|
||||||
/** The options this component's substitute/driver select dropdowns will display */
|
/** The options this component's substitute/driver select dropdowns will display */
|
||||||
driver_select_options: DropdownOption[];
|
driver_select_options: LazyDropdownOption[];
|
||||||
|
|
||||||
/** The options this component's race select dropdown will display */
|
/** The options this component's race select dropdown will display */
|
||||||
race_select_options: DropdownOption[];
|
race_select_options: LazyDropdownOption[];
|
||||||
}
|
}
|
||||||
|
|
||||||
let {
|
let {
|
||||||
|
|||||||
Reference in New Issue
Block a user