Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
b-owl committed Jul 15, 2024
1 parent f54acd3 commit 6a9d897
Show file tree
Hide file tree
Showing 10 changed files with 250 additions and 3 deletions.
3 changes: 3 additions & 0 deletions App.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import React from "react";
declare function App(): React.JSX.Element;
export default App;
197 changes: 197 additions & 0 deletions App.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions App.js.map

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions components/AlbumModal.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from "react";
import { AlbumModalProps } from "../types";
import "../styles/AlbumModal.css";
declare const AlbumModal: (props: AlbumModalProps) => React.JSX.Element;
export default AlbumModal;
5 changes: 5 additions & 0 deletions components/ImageGallery.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from "react";
import { ImageGalleryProps } from "../types";
import "../styles/ImageGallery.css";
declare const ImageGallery: (props: ImageGalleryProps) => React.JSX.Element;
export default ImageGallery;
5 changes: 5 additions & 0 deletions components/SingleImageModal.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from "react";
import { SingleImageModalProps } from "../types";
import "../styles/SingleImageModal.css";
declare const SingleImageModal: (props: SingleImageModalProps) => React.JSX.Element;
export default SingleImageModal;
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as ImageGallery } from "./components/ImageGallery";
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<html lang="en">
<head>
<meta charset="utf-8">
<title>Your Component Library</title>
<title>Your Component Library Demo</title>

</head>
<body>
<div id="root"></div>
<script src="index.esm.js" defer></script>
<script src="App.js"></script>
</body>
</html>

1 change: 1 addition & 0 deletions main.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "./styles/Global.css";
31 changes: 30 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,30 @@
export { default as ImageGallery } from "./components/ImageGallery";
type BaseImageGalleryProps = {
images: string[];
grid: "v1" | "v2";
};
type FullScreenProps = {
fullScreen: true;
width?: never;
height?: never;
};
type NonFullScreenProps = {
fullScreen?: false;
width: number;
height: number;
};
export type ImageGalleryProps = BaseImageGalleryProps & (FullScreenProps | NonFullScreenProps);
export type AlbumModalProps = {
images: string[];
onClose: () => void;
onImageClick: (index: number) => void;
selectedImageIndex: number;
};
export type SingleImageModalProps = {
images: string[];
currentIndex: number;
onClose: () => void;
onPrev: () => void;
onNext: () => void;
onThumbnailClick: (index: number) => void;
};
export {};

0 comments on commit 6a9d897

Please sign in to comment.