@datocms/astro 0.1.12 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
import
|
|
2
|
+
import { Code as AstroCode } from "astro:components";
|
|
3
|
+
import type { Code as CodeNode } from "datocms-structured-text-utils";
|
|
3
4
|
|
|
4
5
|
interface Props {
|
|
5
|
-
|
|
6
|
+
// https://www.datocms.com/docs/structured-text/dast#code
|
|
7
|
+
node: CodeNode;
|
|
6
8
|
}
|
|
7
9
|
|
|
8
10
|
const { node } = Astro.props;
|
|
9
|
-
|
|
10
|
-
const { code, language } = node;
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
<
|
|
13
|
+
<AstroCode code={node.code} lang={node.language as "js"} />
|