Skip to content

Commit

Permalink
fix: add support for React 18
Browse files Browse the repository at this point in the history
  • Loading branch information
browniebroke committed Jun 22, 2022
1 parent da265a4 commit 17c7f86
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gatsby-image-gallery/src/image-col-wrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
import React, { FC } from 'react'
import React from 'react'
import Col from './column'
import ImgWrapper from './img-wrapper'

interface ImageColWrapperProps {
children?: React.ReactNode
colWidth: number
mdColWidth: number
onClick: () => void
gutter: string
}

const ImageColWrapper: FC<ImageColWrapperProps> = ({
const ImageColWrapper = ({
children,
colWidth,
mdColWidth,
onClick,
gutter,
}) => {
}: ImageColWrapperProps) => {
return (
<Col width={colWidth} md={mdColWidth} onClick={onClick}>
<ImgWrapper margin={gutter}>{children}</ImgWrapper>
Expand Down
1 change: 1 addition & 0 deletions gatsby-image-gallery/test/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ describe('Gallery component', () => {

describe('custom wrapper', () => {
const CustomWrapper: React.FC<{
children?: React.ReactNode
onClick?: () => void
}> = ({ children, onClick }) => <div onClick={onClick}>{children}</div>

Expand Down

0 comments on commit 17c7f86

Please sign in to comment.