Skip to content

Commit 83c6e09

Browse files
committed
refactor: Use empty object as customStyles' default value to reflect the accepted data type
1 parent 906d533 commit 83c6e09

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ImageGallery.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function ImageGallery({
88
columnWidth = 230,
99
gapSize = 24,
1010
fixedCaption = false,
11-
customStyles = undefined,
11+
customStyles = {},
1212
}: ImageGalleryPropsType) {
1313
const [imageSrc, setImageSrc] = useState<string | undefined>(undefined);
1414
const [slideNumber, setSlideNumber] = useState(1);

src/ImageGalleryStyles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export function imageGalleryStyles(
55
columnWidth?: string | number,
66
gapSize?: number,
77
fixedCaption?: boolean
8-
) : ImageGalleryStylesType {
8+
): ImageGalleryStylesType {
99
const galleryContainerStyle: React.CSSProperties = {
1010
columnCount,
1111
columnWidth: `${columnWidth}px`,

0 commit comments

Comments
 (0)