-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathglobals.d.ts
37 lines (32 loc) · 1.1 KB
/
globals.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
declare module "@sanity/block-content-to-react" {
import {ImageUrlBuilderOptionsWithAliases} from "@sanity/image-url/lib/types/types";
import {ElementType, ReactElement} from "react";
namespace BlockContent {
interface PortableTextEntry {
[key: string]: unknown;
_type?: string;
_key?: string;
}
interface PortableTextProps {
blocks?: PortableTextEntry[];
className?: string;
renderContainerOnSingleChild?: boolean;
serializers?: PortableTextSerializers;
imageOptions?: ImageUrlBuilderOptionsWithAliases;
projectId?: string;
dataset?: string;
}
interface PortableTextSerializers {
types?: Record<string, string | ElementType>;
marks?: Record<string, string | ElementType>;
list?: string | ElementType;
listItem?: string | ElementType;
hardBreak?: string | ElementType;
container?: string | ElementType;
markFallback?: string | ElementType;
text?: string | ElementType;
}
}
function BlockContent(props: BlockContent.PortableTextProps): ReactElement;
export = BlockContent;
}