From 20803c56631f82b8dbea747974656ee2a74f3992 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Sun, 15 Dec 2024 20:56:49 +0100 Subject: [PATCH] Lib: Only pass single "team_select_value" into component except of all of them --- src/lib/components/DriverCard.svelte | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/lib/components/DriverCard.svelte b/src/lib/components/DriverCard.svelte index 48b7b7b..ab40abf 100644 --- a/src/lib/components/DriverCard.svelte +++ b/src/lib/components/DriverCard.svelte @@ -17,11 +17,15 @@ /** Require all inputs if [true] */ require_inputs?: boolean; - /** The [src] of the team logo template preview */ - logo_template?: string; + /** The [src] of the driver headshot template preview */ + headshot_template?: string; - team_select_values: { [key: string]: string }; + // TODO: Move into this component? + /** The value this component's team select dropdown will bind to */ + team_select_value: string; + + /** The options this component's team select dropdown will display */ team_select_options: DropdownOption[]; } @@ -29,14 +33,14 @@ driver = undefined, disable_inputs = false, require_inputs = false, - logo_template = "", - team_select_values, + headshot_template = "", + team_select_value, team_select_options, }: DriverCardProps = $props();
@@ -78,7 +82,7 @@