-
Notifications
You must be signed in to change notification settings - Fork 82
/
index.d.ts
38 lines (32 loc) · 888 Bytes
/
index.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
38
declare module 'react-shadow' {
import * as React from 'react';
interface IProps {
mode?: 'open' | 'closed';
delegatesFocus?: boolean;
styleSheets?: CSSStyleSheet[];
ssr?: boolean;
children?: React.ReactNode;
}
type Root = {
[name: string]: React.ComponentType<
React.HTMLProps<HTMLElement> & IProps
>;
};
type CreateProxyFn = (
target: unknown,
id: string,
render: ({
children,
}: {
children: React.ReactNode;
ssr: boolean;
root: ShadowRoot;
}) => React.ReactNode,
) => Root;
const createProxy: CreateProxyFn;
const ReactShadowRoot: Root;
const useShadowRoot: () => ShadowRoot;
export default ReactShadowRoot;
export { createProxy, useShadowRoot };
export type { Root };
}