Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Commit cdac88a

Browse files
committed
Modified the type file
1 parent 09dff20 commit cdac88a

File tree

5 files changed

+6
-41
lines changed

5 files changed

+6
-41
lines changed

emotion.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ declare module 'react-shadow/emotion' {
22
import * as React from 'react';
33

44
type Root = {
5-
[name: string]: React.ComponentType;
5+
[name: string]: React.ComponentType<React.HTMLProps<HTMLElement>>;
66
};
77

88
const ReactShadowRoot: Root;

example/components/Widget/styles.css

+2-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ select {
9898
-webkit-appearance: none;
9999
appearance: none;
100100
padding: 5px 10px;
101-
background: white url('/public/images/arrow.svg') no-repeat right 10px center;
101+
background: white url('/public/images/arrow.svg') no-repeat right 10px
102+
center;
102103
background-size: 10px;
103104
border: 1px solid rgba(0, 0, 0, 0.25);
104105
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);

index.d.ts

+1-37
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,7 @@ declare module 'react-shadow' {
22
import * as React from 'react';
33

44
type Root = {
5-
[name: string]: React.ComponentType;
6-
};
7-
8-
const ReactShadowRoot: Root;
9-
10-
export default ReactShadowRoot;
11-
}
12-
13-
declare module 'react-shadow/styled-components' {
14-
import * as React from 'react';
15-
16-
type Root = {
17-
[name: string]: React.ComponentType;
18-
};
19-
20-
const ReactShadowRoot: Root;
21-
22-
export default ReactShadowRoot;
23-
}
24-
25-
declare module 'react-shadow/emotion' {
26-
import * as React from 'react';
27-
28-
type Root = {
29-
[name: string]: React.ComponentType;
30-
};
31-
32-
const ReactShadowRoot: Root;
33-
34-
export default ReactShadowRoot;
35-
}
36-
37-
declare module 'react-shadow/material-ui' {
38-
import * as React from 'react';
39-
40-
type Root = {
41-
[name: string]: React.ComponentType;
5+
[name: string]: React.ComponentType<React.HTMLProps<HTMLElement>>;
426
};
437

448
const ReactShadowRoot: Root;

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"spec": "ava --verbose",
2222
"lint": "eslint '**/**.js'",
2323
"coverage": "nyc ava && nyc report --reporter=text-lcov | coveralls",
24-
"format": "NODE_ENV=production prettier --write '**/**.{js,html,mjs,css}'",
24+
"format": "NODE_ENV=production prettier --write '**/**.{js,html,mjs,css,ts}'",
2525
"start": "next ./example -p ${PORT:-3000}",
2626
"deploy": "now",
2727
"prepublishOnly": "mv dist/* ./",

styled-components.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ declare module 'react-shadow/styled-components' {
22
import * as React from 'react';
33

44
type Root = {
5-
[name: string]: React.ComponentType;
5+
[name: string]: React.ComponentType<React.HTMLProps<HTMLElement>>;
66
};
77

88
const ReactShadowRoot: Root;

0 commit comments

Comments
 (0)