Skip to content

Commit

Permalink
Merge pull request #141 from harshzalavadiya/ts-types
Browse files Browse the repository at this point in the history
♻️ typescript typings + upgrades
  • Loading branch information
harshzalavadiya authored Oct 1, 2020
2 parents de9b4fd + e4b9de6 commit dc46e5b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 24 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tiny-skeleton-loader-react",
"version": "1.1.3",
"version": "1.1.4",
"description": "zero dependency, ultra lightweight (1KB gzipped) skeleton loader component for react",
"author": "harshzalavadiya",
"license": "MIT",
Expand All @@ -18,22 +18,22 @@
},
"dependencies": {},
"peerDependencies": {
"react": "^16.12.0",
"react-dom": "^16.12.0"
"react": "^16.13.1",
"react-dom": "^16.13.1"
},
"devDependencies": {
"@types/react": "^16.9.17",
"@types/react-dom": "^16.9.4",
"@types/react": "^16.9.49",
"@types/react-dom": "^16.9.8",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"rollup": "^2.1.0",
"rollup": "^2.28.2",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-peer-deps-external": "^2.2.0",
"rollup-plugin-postcss": "^3.1.1",
"rollup-plugin-typescript2": "^0.27.0",
"rollup-plugin-peer-deps-external": "^2.2.3",
"rollup-plugin-postcss": "^3.1.8",
"rollup-plugin-typescript2": "^0.27.3",
"rollup-plugin-url": "^3.0.1",
"typescript": "^4.0.2"
"typescript": "^4.0.3"
},
"files": [
"dist"
Expand Down
16 changes: 13 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,25 @@ import React from "react";

import css from "./styles.css";

interface SkeletonLoaderProps {
width?;
height?;
background?;
radius?;
circle?: boolean;
block?: boolean;
style?: React.CSSProperties;
}

function SkeletonLoader({
width = "100%",
height = "1em",
background = "#E9ECEF",
radius = "4px",
circle = false,
block = true,
style = {}
}) {
style = {},
}: SkeletonLoaderProps) {
return (
<div
className={css.skeleton}
Expand All @@ -20,7 +30,7 @@ function SkeletonLoader({
background,
borderRadius: circle ? "50%" : radius,
display: block ? "block" : "inline-block",
...style
...style,
}}
>
&zwnj;
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": true,
"noImplicitAny": false,
"strictNullChecks": true,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true,
Expand Down
20 changes: 10 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.2.tgz#690a1475b84f2a884fd07cd797c00f5f31356ea8"
integrity sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==

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

"@types/react@*", "@types/react@^16.9.17":
"@types/react@*", "@types/react@^16.9.49":
version "16.9.49"
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.49.tgz#09db021cf8089aba0cdb12a49f8021a69cce4872"
integrity sha512-DtLFjSj0OYAdVLBbyjhuV9CdGVHCkHn2R+xr3XkBvK2rS1Y1tkc14XSGjYgm5Fjjr90AxH9tiSzc1pCFMGO06g==
Expand Down Expand Up @@ -1478,12 +1478,12 @@ rollup-plugin-node-resolve@^5.2.0:
resolve "^1.11.1"
rollup-pluginutils "^2.8.1"

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

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

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

rollup@^2.1.0:
rollup@^2.28.2:
version "2.28.2"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.28.2.tgz#599ec4978144a82d8a8ec3d37670a8440cb04e4b"
integrity sha512-8txbsFBFLmm9Xdt4ByTOGa9Muonmc8MfNjnGAR8U8scJlF1ZW7AgNZa7aqBXaKtlvnYP/ab++fQIq9dB9NWUbg==
Expand Down Expand Up @@ -1695,7 +1695,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e"
integrity sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==

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

0 comments on commit dc46e5b

Please sign in to comment.