Skip to content

Commit 5341f72

Browse files
committed
chore: misc
1 parent 85fdf66 commit 5341f72

File tree

5 files changed

+29
-9
lines changed

5 files changed

+29
-9
lines changed

apps/docs/env.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
declare module "!!raw-loader!*" {
2+
const src: string;
3+
export default src;
4+
}

apps/docs/next.config.mjs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,21 @@ export default withNextra({
4242
],
4343
});
4444

45+
// Inject "use client"; to UI Kit packages' entry (index.ts) file
46+
config.module.rules.push({
47+
test: /packages\/.*\/src\/index\.ts$/,
48+
use: [
49+
{
50+
loader: "string-replace-loader",
51+
options: {
52+
search: "^",
53+
replace: '"use client";\n',
54+
flags: "g",
55+
},
56+
},
57+
],
58+
});
59+
4560
// Add raw file loader
4661
config.module.rules.push({
4762
test: /\.(tsx|ts|mdx)$/,

apps/docs/src/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ export const metadata = {
1818
metadataBase: new URL("https://github.com/lumada-design/hv-uikit-react"),
1919
title: { default: "UI Kit", template: "%s - UI Kit" },
2020
description,
21+
icons: "https://lumada-design.github.io/assets/uikit-icon.svg",
2122
creator: "UI Kit Team",
2223
applicationName: title,
23-
// generator: "Next.js",
2424
appleWebApp: { title },
2525
openGraph: {
2626
url: "@site",

apps/docs/src/components/Examples.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1+
import canvas from "!!raw-loader!../content/examples/canvas.mdx";
2+
import charts from "!!raw-loader!../content/examples/charts.mdx";
3+
import dnd from "!!raw-loader!../content/examples/dnd.mdx";
4+
import inputs from "!!raw-loader!../content/examples/inputs.mdx";
5+
import kpis from "!!raw-loader!../content/examples/kpis.mdx";
6+
import tables from "!!raw-loader!../content/examples/tables.mdx";
17
import { clsx } from "clsx";
28
import Link from "next/link";
39
import {
410
HvIconContainer,
511
HvTypography,
612
} from "@hitachivantara/uikit-react-core";
713

8-
import canvas from "../content/examples/canvas.mdx?raw";
9-
import charts from "../content/examples/charts.mdx?raw";
10-
import dnd from "../content/examples/dnd.mdx?raw";
11-
import inputs from "../content/examples/inputs.mdx?raw";
12-
import kpis from "../content/examples/kpis.mdx?raw";
13-
import tables from "../content/examples/tables.mdx?raw";
14-
1514
/**
1615
* Extracts the number of CodeBlock components in the given file content.
1716
*/

apps/docs/src/content/_meta.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { MetaRecord } from "nextra";
2+
13
export default {
24
index: {
35
type: "page",
@@ -29,4 +31,4 @@ export default {
2931
title: "Examples",
3032
theme: { layout: "full", toc: false },
3133
},
32-
};
34+
} satisfies MetaRecord;

0 commit comments

Comments
 (0)