Skip to content

Commit ec498d1

Browse files
Brought declarations back
1 parent 6a7585b commit ec498d1

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

dist/types/GoToTopButton.d.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React, { CSSProperties } from 'react';
2+
import "./goToTopButton.css";
3+
interface GoToTopButtonProps {
4+
arrowComponent?: JSX.Element;
5+
backgroundColor: Exclude<CSSProperties['backgroundColor'], undefined>;
6+
backgroundColorOnHover: Exclude<CSSProperties['backgroundColor'], undefined>;
7+
arrowColor: Exclude<CSSProperties['color'], undefined>;
8+
arrowColorOnHover: Exclude<CSSProperties['color'], undefined>;
9+
}
10+
declare const GoToTopButton: ({ arrowComponent, backgroundColor, backgroundColorOnHover, arrowColor, arrowColorOnHover }: GoToTopButtonProps) => React.JSX.Element;
11+
export default GoToTopButton;

dist/types/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import GoToTopButton from "./GoToTopButton";
2+
export default GoToTopButton;

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nightmaregaurav/react-go-to-top-button",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "Simple React component to show a go-to-top button on bottom right of the page.",
55
"repository": {
66
"type": "git",
@@ -35,5 +35,6 @@
3535
"main": "dist/index.js",
3636
"files": [
3737
"dist"
38-
]
38+
],
39+
"types": "dist/types/index.d.ts"
3940
}

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"compilerOptions": {
33
"target": "es2016",
44
"jsx": "react",
5-
"declaration": false,
5+
"declaration": true,
6+
"declarationDir": "dist/types",
67
"module": "ESNext",
78
"esModuleInterop": true,
89
"forceConsistentCasingInFileNames": true,

0 commit comments

Comments
 (0)