Skip to content

Commit dc46e5b

Browse files
Merge pull request #141 from harshzalavadiya/ts-types
♻️ typescript typings + upgrades
2 parents de9b4fd + e4b9de6 commit dc46e5b

File tree

4 files changed

+34
-24
lines changed

4 files changed

+34
-24
lines changed

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tiny-skeleton-loader-react",
3-
"version": "1.1.3",
3+
"version": "1.1.4",
44
"description": "zero dependency, ultra lightweight (1KB gzipped) skeleton loader component for react",
55
"author": "harshzalavadiya",
66
"license": "MIT",
@@ -18,22 +18,22 @@
1818
},
1919
"dependencies": {},
2020
"peerDependencies": {
21-
"react": "^16.12.0",
22-
"react-dom": "^16.12.0"
21+
"react": "^16.13.1",
22+
"react-dom": "^16.13.1"
2323
},
2424
"devDependencies": {
25-
"@types/react": "^16.9.17",
26-
"@types/react-dom": "^16.9.4",
25+
"@types/react": "^16.9.49",
26+
"@types/react-dom": "^16.9.8",
2727
"react": "^16.4.1",
2828
"react-dom": "^16.4.1",
29-
"rollup": "^2.1.0",
29+
"rollup": "^2.28.2",
3030
"rollup-plugin-commonjs": "^10.1.0",
3131
"rollup-plugin-node-resolve": "^5.2.0",
32-
"rollup-plugin-peer-deps-external": "^2.2.0",
33-
"rollup-plugin-postcss": "^3.1.1",
34-
"rollup-plugin-typescript2": "^0.27.0",
32+
"rollup-plugin-peer-deps-external": "^2.2.3",
33+
"rollup-plugin-postcss": "^3.1.8",
34+
"rollup-plugin-typescript2": "^0.27.3",
3535
"rollup-plugin-url": "^3.0.1",
36-
"typescript": "^4.0.2"
36+
"typescript": "^4.0.3"
3737
},
3838
"files": [
3939
"dist"

src/index.tsx

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,25 @@ import React from "react";
22

33
import css from "./styles.css";
44

5+
interface SkeletonLoaderProps {
6+
width?;
7+
height?;
8+
background?;
9+
radius?;
10+
circle?: boolean;
11+
block?: boolean;
12+
style?: React.CSSProperties;
13+
}
14+
515
function SkeletonLoader({
616
width = "100%",
717
height = "1em",
818
background = "#E9ECEF",
919
radius = "4px",
1020
circle = false,
1121
block = true,
12-
style = {}
13-
}) {
22+
style = {},
23+
}: SkeletonLoaderProps) {
1424
return (
1525
<div
1626
className={css.skeleton}
@@ -20,7 +30,7 @@ function SkeletonLoader({
2030
background,
2131
borderRadius: circle ? "50%" : radius,
2232
display: block ? "block" : "inline-block",
23-
...style
33+
...style,
2434
}}
2535
>
2636
&zwnj;

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"forceConsistentCasingInFileNames": true,
1313
"noImplicitReturns": true,
1414
"noImplicitThis": true,
15-
"noImplicitAny": true,
15+
"noImplicitAny": false,
1616
"strictNullChecks": true,
1717
"suppressImplicitAnyIndexErrors": true,
1818
"noUnusedLocals": true,

yarn.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@
3636
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8"
3737
integrity sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==
3838

39-
"@types/react-dom@^16.9.4":
39+
"@types/react-dom@^16.9.8":
4040
version "16.9.8"
4141
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.9.8.tgz#fe4c1e11dfc67155733dfa6aa65108b4971cb423"
4242
integrity sha512-ykkPQ+5nFknnlU6lDd947WbQ6TE3NNzbQAkInC2EKY1qeYdTKp7onFusmYZb+ityzx2YviqT6BXSu+LyWWJwcA==
4343
dependencies:
4444
"@types/react" "*"
4545

46-
"@types/react@*", "@types/react@^16.9.17":
46+
"@types/react@*", "@types/react@^16.9.49":
4747
version "16.9.49"
4848
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.49.tgz#09db021cf8089aba0cdb12a49f8021a69cce4872"
4949
integrity sha512-DtLFjSj0OYAdVLBbyjhuV9CdGVHCkHn2R+xr3XkBvK2rS1Y1tkc14XSGjYgm5Fjjr90AxH9tiSzc1pCFMGO06g==
@@ -1478,12 +1478,12 @@ rollup-plugin-node-resolve@^5.2.0:
14781478
resolve "^1.11.1"
14791479
rollup-pluginutils "^2.8.1"
14801480

1481-
rollup-plugin-peer-deps-external@^2.2.0:
1481+
rollup-plugin-peer-deps-external@^2.2.3:
14821482
version "2.2.3"
14831483
resolved "https://registry.yarnpkg.com/rollup-plugin-peer-deps-external/-/rollup-plugin-peer-deps-external-2.2.3.tgz#059a8aec1eefb48a475e9fcedc3b9e3deb521213"
14841484
integrity sha512-W6IePXTExGXVDAlfZbNUUrx3GxUOZP248u5n4a4ID1XZMrbQ+uGeNiEfapvdzwx0qZi5DNH/hDLiPUP+pzFIxg==
14851485

1486-
rollup-plugin-postcss@^3.1.1:
1486+
rollup-plugin-postcss@^3.1.8:
14871487
version "3.1.8"
14881488
resolved "https://registry.yarnpkg.com/rollup-plugin-postcss/-/rollup-plugin-postcss-3.1.8.tgz#d1bcaf8eb0fcb0936e3684c22dd8628d13a82fd1"
14891489
integrity sha512-JHnGfW8quNc6ePxEkZ05HEZ1YiRxDgY9RKEetMfsrwxR2kh/d90OVScTc6b1c2Q17Cs/5TRYL+1uddG21lQe3w==
@@ -1503,10 +1503,10 @@ rollup-plugin-postcss@^3.1.1:
15031503
safe-identifier "^0.4.1"
15041504
style-inject "^0.3.0"
15051505

1506-
rollup-plugin-typescript2@^0.27.0:
1507-
version "0.27.2"
1508-
resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.27.2.tgz#871a7f5d2a774f9cef50d25da868eec72acc2ed8"
1509-
integrity sha512-zarMH2F8oT/NO6p20gl/jkts+WxyzOlhOIUwUU/EDx5e6ewdDPS/flwLj5XFuijUCr64bZwqKuRVwCPdXXYefQ==
1506+
rollup-plugin-typescript2@^0.27.3:
1507+
version "0.27.3"
1508+
resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.27.3.tgz#cd9455ac026d325b20c5728d2cc54a08a771b68b"
1509+
integrity sha512-gmYPIFmALj9D3Ga1ZbTZAKTXq1JKlTQBtj299DXhqYz9cL3g/AQfUvbb2UhH+Nf++cCq941W2Mv7UcrcgLzJJg==
15101510
dependencies:
15111511
"@rollup/pluginutils" "^3.1.0"
15121512
find-cache-dir "^3.3.1"
@@ -1529,7 +1529,7 @@ rollup-pluginutils@^2.8.1, rollup-pluginutils@^2.8.2:
15291529
dependencies:
15301530
estree-walker "^0.6.1"
15311531

1532-
rollup@^2.1.0:
1532+
rollup@^2.28.2:
15331533
version "2.28.2"
15341534
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.28.2.tgz#599ec4978144a82d8a8ec3d37670a8440cb04e4b"
15351535
integrity sha512-8txbsFBFLmm9Xdt4ByTOGa9Muonmc8MfNjnGAR8U8scJlF1ZW7AgNZa7aqBXaKtlvnYP/ab++fQIq9dB9NWUbg==
@@ -1695,7 +1695,7 @@ tslib@2.0.1:
16951695
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e"
16961696
integrity sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==
16971697

1698-
typescript@^4.0.2:
1698+
typescript@^4.0.3:
16991699
version "4.0.3"
17001700
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5"
17011701
integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==

0 commit comments

Comments
 (0)