diff --git a/apps/spotlight/public/uswds b/apps/spotlight/public/uswds new file mode 120000 index 00000000..bb61b72f --- /dev/null +++ b/apps/spotlight/public/uswds @@ -0,0 +1 @@ +../../../packages/design/static/uswds \ No newline at end of file diff --git a/apps/spotlight/src/components/AppFormManager.tsx b/apps/spotlight/src/components/AppFormManager.tsx index 610526f6..394120a1 100644 --- a/apps/spotlight/src/components/AppFormManager.tsx +++ b/apps/spotlight/src/components/AppFormManager.tsx @@ -16,6 +16,7 @@ export default function () { config: ctx.formConfig, components: defaultFormElementComponents, editComponents: defaultFormElementEditComponents, + uswdsRoot: ctx.uswdsRoot, }} formService={ctx.formService} baseUrl={ctx.baseUrl} diff --git a/apps/spotlight/src/components/AppFormRouter.tsx b/apps/spotlight/src/components/AppFormRouter.tsx index 4ea3c405..7164b641 100644 --- a/apps/spotlight/src/components/AppFormRouter.tsx +++ b/apps/spotlight/src/components/AppFormRouter.tsx @@ -10,6 +10,7 @@ export default function AppFormRouter() { context={{ config: ctx.formConfig, components: defaultFormElementComponents, + uswdsRoot: ctx.uswdsRoot, }} formService={ctx.formService} /> diff --git a/apps/spotlight/src/context.ts b/apps/spotlight/src/context.ts index 12330e79..4b943864 100644 --- a/apps/spotlight/src/context.ts +++ b/apps/spotlight/src/context.ts @@ -13,6 +13,7 @@ export type AppContext = { github: GithubRepository; formConfig: FormConfig; formService: FormService; + uswdsRoot: `${string}/`; }; let _context: AppContext | null = null; @@ -24,12 +25,13 @@ export const getAppContext = (): AppContext => { return _context; }; -const createAppContext = (env: any) => { +const createAppContext = (env: any): AppContext => { return { github: env.GITHUB, baseUrl: env.BASE_URL, formConfig: defaultFormConfig, formService: createAppFormService(), + uswdsRoot: `${env.BASE_URL}uswds/`, }; }; diff --git a/apps/spotlight/src/layouts/Layout.astro b/apps/spotlight/src/layouts/Layout.astro index bf87c867..4b87ba98 100644 --- a/apps/spotlight/src/layouts/Layout.astro +++ b/apps/spotlight/src/layouts/Layout.astro @@ -45,7 +45,10 @@ const context = getAppContext(); /> - + {title} @@ -54,7 +57,7 @@ const context = getAppContext();
-