From 3d210e2e2e2fec37accb0c348dc6f209ba61b2f8 Mon Sep 17 00:00:00 2001 From: Davis SHYAKA <87414827+davis-shyaka@users.noreply.github.com> Date: Mon, 28 Oct 2024 11:24:53 +0200 Subject: [PATCH 1/2] docs: fix select areaLabel --- .../src/lib/registry/default/example/cards/report-issue.svelte | 2 +- .../src/lib/registry/new-york/example/cards/report-issue.svelte | 2 +- .../(app)/examples/cards/(components)/report-issue.svelte | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sites/docs/src/lib/registry/default/example/cards/report-issue.svelte b/sites/docs/src/lib/registry/default/example/cards/report-issue.svelte index 74e3dca75..941079525 100644 --- a/sites/docs/src/lib/registry/default/example/cards/report-issue.svelte +++ b/sites/docs/src/lib/registry/default/example/cards/report-issue.svelte @@ -55,7 +55,7 @@ securityLevels.find((l) => l.value === securityLevel) ?? "Select level" ); let area = $state(areas[1].value); - const areaLabel = $derived(areas.find((a) => a.value === area) ?? "Select"); + const areaLabel = $derived(areas.find((a) => a.value === area)?.label ?? "Select"); diff --git a/sites/docs/src/lib/registry/new-york/example/cards/report-issue.svelte b/sites/docs/src/lib/registry/new-york/example/cards/report-issue.svelte index 96ffbd50b..b6a3a67ec 100644 --- a/sites/docs/src/lib/registry/new-york/example/cards/report-issue.svelte +++ b/sites/docs/src/lib/registry/new-york/example/cards/report-issue.svelte @@ -54,7 +54,7 @@ securityLevels.find((l) => l.value === securityLevel) ?? "Select level" ); let area = $state(areas[1].value); - const areaLabel = $derived(areas.find((a) => a.value === area) ?? "Select"); + const areaLabel = $derived(areas.find((a) => a.value === area)?.label ?? "Select"); diff --git a/sites/docs/src/routes/(app)/examples/cards/(components)/report-issue.svelte b/sites/docs/src/routes/(app)/examples/cards/(components)/report-issue.svelte index 7be443b14..c66c70ac0 100644 --- a/sites/docs/src/routes/(app)/examples/cards/(components)/report-issue.svelte +++ b/sites/docs/src/routes/(app)/examples/cards/(components)/report-issue.svelte @@ -55,7 +55,7 @@ securityLevels.find((l) => l.value === securityLevel) ?? "Select level" ); let area = $state(areas[1].value); - const areaLabel = $derived(areas.find((a) => a.value === area) ?? "Select"); + const areaLabel = $derived(areas.find((a) => a.value === area)?.label ?? "Select"); From f1ed212748325ae820a4f115274e3db1ab54a78a Mon Sep 17 00:00:00 2001 From: Davis SHYAKA <87414827+davis-shyaka@users.noreply.github.com> Date: Mon, 28 Oct 2024 11:27:26 +0200 Subject: [PATCH 2/2] security levels --- .../src/lib/registry/default/example/cards/report-issue.svelte | 2 +- .../src/lib/registry/new-york/example/cards/report-issue.svelte | 2 +- .../(app)/examples/cards/(components)/report-issue.svelte | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sites/docs/src/lib/registry/default/example/cards/report-issue.svelte b/sites/docs/src/lib/registry/default/example/cards/report-issue.svelte index 941079525..8ab043c88 100644 --- a/sites/docs/src/lib/registry/default/example/cards/report-issue.svelte +++ b/sites/docs/src/lib/registry/default/example/cards/report-issue.svelte @@ -52,7 +52,7 @@ const id = useId("report-issue"); let securityLevel = $state(securityLevels[1].value); const securityLevelLabel = $derived( - securityLevels.find((l) => l.value === securityLevel) ?? "Select level" + securityLevels.find((l) => l.value === securityLevel)?.label ?? "Select level" ); let area = $state(areas[1].value); const areaLabel = $derived(areas.find((a) => a.value === area)?.label ?? "Select"); diff --git a/sites/docs/src/lib/registry/new-york/example/cards/report-issue.svelte b/sites/docs/src/lib/registry/new-york/example/cards/report-issue.svelte index b6a3a67ec..4f7ce0c7c 100644 --- a/sites/docs/src/lib/registry/new-york/example/cards/report-issue.svelte +++ b/sites/docs/src/lib/registry/new-york/example/cards/report-issue.svelte @@ -51,7 +51,7 @@ const id = useId("report-issue"); let securityLevel = $state(securityLevels[1].value); const securityLevelLabel = $derived( - securityLevels.find((l) => l.value === securityLevel) ?? "Select level" + securityLevels.find((l) => l.value === securityLevel)?.label ?? "Select level" ); let area = $state(areas[1].value); const areaLabel = $derived(areas.find((a) => a.value === area)?.label ?? "Select"); diff --git a/sites/docs/src/routes/(app)/examples/cards/(components)/report-issue.svelte b/sites/docs/src/routes/(app)/examples/cards/(components)/report-issue.svelte index c66c70ac0..05020b1db 100644 --- a/sites/docs/src/routes/(app)/examples/cards/(components)/report-issue.svelte +++ b/sites/docs/src/routes/(app)/examples/cards/(components)/report-issue.svelte @@ -52,7 +52,7 @@ const id = useId("report-issue"); let securityLevel = $state(securityLevels[1].value); const securityLevelLabel = $derived( - securityLevels.find((l) => l.value === securityLevel) ?? "Select level" + securityLevels.find((l) => l.value === securityLevel)?.label ?? "Select level" ); let area = $state(areas[1].value); const areaLabel = $derived(areas.find((a) => a.value === area)?.label ?? "Select");