Skip to content

Commit 6a649fd

Browse files
committed
[docs] Add optional data controls example
1 parent 9d0d460 commit 6a649fd

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

apps/docs2/src/shared.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export enum GenericExample {
8181
MultiStepNativeForm = "multi-step-native-form",
8282
LayoutSlots = "layout-slots",
8383
PreuploadFile = "preupload-file",
84+
OptionalDataControls = "optional-data-controls",
8485
}
8586

8687
export const GENERIC_EXAMPLES = Object.values(GenericExample);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import sveltePage from "%/optional-data-controls/src/routes/+page.svelte?raw";
2+
3+
import type { Layer } from "../layer";
4+
5+
export const layer = {
6+
files: {
7+
"src/routes/+page.svelte": sveltePage,
8+
},
9+
} satisfies Layer;
10+

apps/docs2/src/web-ide/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ const EXAMPLE_LAYERS: Record<Example, () => LayerPromise> = {
8282
import("./examples/multi-step-native-form"),
8383
[GenericExample.LayoutSlots]: () => import("./examples/layout-slots"),
8484
[GenericExample.PreuploadFile]: () => import("./examples/preupload-file"),
85+
[GenericExample.OptionalDataControls]: () =>
86+
import("./examples/optional-data-controls"),
8587
[ValidatorSpecificExample.ZodStarter]: () => import("./examples/zod-starter"),
8688
[ValidatorSpecificExample.ValibotStarter]: () =>
8789
import("./examples/valibot-starter"),

0 commit comments

Comments
 (0)