Skip to content

Commit d4f3c15

Browse files
authored
feat: export types in the npm package (#1241)
* feat: export types in the npm package * chore(example): fix type for Layout component
1 parent 0d99de3 commit d4f3c15

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

example/src/components/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { useStaticQuery, graphql } from 'gatsby'
1111
import Header from './header'
1212
import './layout.css'
1313

14-
const Layout: React.FC = ({ children }) => {
14+
const Layout: React.FC<{ children?: React.ReactNode }> = ({ children }) => {
1515
const data = useStaticQuery(graphql`
1616
query SiteTitleQuery {
1717
site {

gatsby-image-gallery/src/column.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import styled, { css } from 'styled-components'
22

3-
interface ColProps {
3+
export interface ColProps {
44
md: number
55
width: number
66
}

gatsby-image-gallery/src/image-col-wrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react'
22
import Col from './column'
33
import ImgWrapper from './img-wrapper'
44

5-
interface ImageColWrapperProps {
5+
export interface ImageColWrapperProps {
66
children?: React.ReactNode
77
colWidth: number
88
mdColWidth: number

gatsby-image-gallery/src/img-wrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import styled from 'styled-components'
22

3-
interface ImgWrapperProps {
3+
export interface ImgWrapperProps {
44
margin: string
55
}
66

gatsby-image-gallery/src/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ import ImageColWrapper from './image-col-wrapper'
88

99
import * as LightboxCSS from 'react-image-lightbox/style.css'
1010

11-
interface ImageProp {
11+
export interface ImageProp {
1212
full: IGatsbyImageData
1313
thumb: IGatsbyImageData
1414
thumbAlt?: string
1515
title?: React.ReactNode
1616
caption?: React.ReactNode
1717
}
1818

19-
interface GalleryProps {
19+
export interface GalleryProps {
2020
images: ImageProp[]
2121
colWidth?: number
2222
mdColWidth?: number

gatsby-image-gallery/src/row.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import styled, { css } from 'styled-components'
22

3-
interface RowProps {
3+
export interface RowProps {
44
margin: number
55
}
66

0 commit comments

Comments
 (0)