Skip to content

Commit

Permalink
Brought declaration back
Browse files Browse the repository at this point in the history
  • Loading branch information
nightmaregaurav authored Nov 10, 2024
1 parent bdcd161 commit 481d4ae
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
11 changes: 11 additions & 0 deletions dist/types/ProfilePicture.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React, { CSSProperties } from 'react';
import "./profilePicture.css";
interface ProfilePictureProps {
size: Exclude<CSSProperties["width"], undefined>;
imageUrl: string;
showOnlineBadge: boolean;
isOnline?: boolean;
onlineBadgeColor?: Exclude<CSSProperties["color"], undefined>;
}
declare const ProfilePicture: ({ size, imageUrl, showOnlineBadge, isOnline, onlineBadgeColor, }: ProfilePictureProps) => React.JSX.Element;
export default ProfilePicture;
2 changes: 2 additions & 0 deletions dist/types/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import ProfilePicture from "./ProfilePicture";
export default ProfilePicture;
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nightmaregaurav/react-profile-picture",
"version": "1.0.4",
"version": "1.0.5",
"description": "Simple react profile picture component.",
"repository": {
"type": "git",
Expand Down Expand Up @@ -37,5 +37,6 @@
"main": "dist/index.js",
"files": [
"dist"
]
],
"types": "dist/types/index.d.ts"
}
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"compilerOptions": {
"target": "es2016",
"jsx": "react",
"declaration": false,
"declaration": true,
"declarationDir": "dist/types",
"module": "ESNext",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
Expand Down

0 comments on commit 481d4ae

Please # to comment.