diff --git a/src/components/atoms/List/Item/Item.tsx b/src/components/atoms/List/Item/Item.tsx index 141fc77a3..cc1c78234 100644 --- a/src/components/atoms/List/Item/Item.tsx +++ b/src/components/atoms/List/Item/Item.tsx @@ -2,7 +2,7 @@ import React, { HTMLAttributes, ReactNode } from 'react'; import styled from 'styled-components'; import Icon from '../../Icon/Icon'; -interface ItemProps extends HTMLAttributes { +export interface ItemProps extends HTMLAttributes { children?: React.ReactNode; icon?: typeof Icon | ReactNode; } diff --git a/src/components/organisms/Accordion/AccordionSection/AccordionSection.tsx b/src/components/organisms/Accordion/AccordionSection/AccordionSection.tsx index 62c9d550f..732e8a426 100644 --- a/src/components/organisms/Accordion/AccordionSection/AccordionSection.tsx +++ b/src/components/organisms/Accordion/AccordionSection/AccordionSection.tsx @@ -3,7 +3,7 @@ import styled from 'styled-components'; import { useAccordionContext } from '../context'; -interface AccordionSectionProps extends React.HTMLAttributes { +export interface AccordionSectionProps extends React.HTMLAttributes { id: string; index: number; } diff --git a/src/components/organisms/Card/CardHeading/CardHeading.tsx b/src/components/organisms/Card/CardHeading/CardHeading.tsx index 987e917ae..1a2f0b913 100644 --- a/src/components/organisms/Card/CardHeading/CardHeading.tsx +++ b/src/components/organisms/Card/CardHeading/CardHeading.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { colors } from '../../../../constants'; import Heading, { OptionalHeadingProps, HeadingTags } from '../../../atoms/Heading/Heading'; -interface CardHeadingProps extends OptionalHeadingProps { +export interface CardHeadingProps extends OptionalHeadingProps { children?: React.ReactNode; as?: HeadingTags; } diff --git a/src/components/organisms/Card/CardImage/CardImage.tsx b/src/components/organisms/Card/CardImage/CardImage.tsx index 80bb99cb0..e27207add 100644 --- a/src/components/organisms/Card/CardImage/CardImage.tsx +++ b/src/components/organisms/Card/CardImage/CardImage.tsx @@ -1,7 +1,7 @@ import React, { ReactNode } from 'react'; import styled from 'styled-components'; -interface CardImageProps { +export interface CardImageProps { /** * url of the background image */ diff --git a/src/components/organisms/Tabs/TabButtons/TabButtons.tsx b/src/components/organisms/Tabs/TabButtons/TabButtons.tsx index 5fcfab933..322343de5 100644 --- a/src/components/organisms/Tabs/TabButtons/TabButtons.tsx +++ b/src/components/organisms/Tabs/TabButtons/TabButtons.tsx @@ -10,7 +10,7 @@ import FlexCol from '../../../layout/FlexCol/FlexCol'; import { useTabsContext } from '../hooks/useTabsContext'; import TabButton, { TabButtonProps } from '../TabButton/TabButton'; -interface TabButtonsProps extends React.HTMLAttributes { +export interface TabButtonsProps extends React.HTMLAttributes { tabButtons: TabButtonProps[]; defaultTab?: string; 'data-automation'?: string; diff --git a/src/components/organisms/Tabs/TabContent/TabContent.tsx b/src/components/organisms/Tabs/TabContent/TabContent.tsx index f99b5996b..40869747b 100644 --- a/src/components/organisms/Tabs/TabContent/TabContent.tsx +++ b/src/components/organisms/Tabs/TabContent/TabContent.tsx @@ -2,7 +2,7 @@ import React, { ReactNode } from 'react'; import styled from 'styled-components'; import { useTabsContext } from '../hooks/useTabsContext'; -interface TabContentProps extends React.HTMLAttributes { +export interface TabContentProps extends React.HTMLAttributes { children: ReactNode; contentFor: string; } diff --git a/src/components/templates/ErrorPages/FiveHundred/FiveHundred.tsx b/src/components/templates/ErrorPages/FiveHundred/FiveHundred.tsx index 285090b81..8fac9e6d2 100644 --- a/src/components/templates/ErrorPages/FiveHundred/FiveHundred.tsx +++ b/src/components/templates/ErrorPages/FiveHundred/FiveHundred.tsx @@ -12,7 +12,7 @@ import { colors } from '../../../../constants'; import { ErrorTemplateProps } from '../types'; import { StyledIcon, StyledLink } from '../styles'; -interface FiveHundredErrorProps extends ErrorTemplateProps { +export interface FiveHundredErrorProps extends ErrorTemplateProps { linkUrl?: string; linkText?: string; } diff --git a/src/components/templates/ErrorPages/Four0Four/Four0Four.tsx b/src/components/templates/ErrorPages/Four0Four/Four0Four.tsx index 0e2d250d6..02a030732 100644 --- a/src/components/templates/ErrorPages/Four0Four/Four0Four.tsx +++ b/src/components/templates/ErrorPages/Four0Four/Four0Four.tsx @@ -11,7 +11,7 @@ import { colors } from '../../../../constants'; import { ErrorTemplateProps } from '../types'; import { StyledIcon, StyledLink } from '../styles'; -interface Four0FourErrorProps extends ErrorTemplateProps { +export interface Four0FourErrorProps extends ErrorTemplateProps { linkUrl?: string; linkText?: string; } diff --git a/src/components/templates/ErrorPages/Maintenance/Maintenance.tsx b/src/components/templates/ErrorPages/Maintenance/Maintenance.tsx index 63b42c5c1..c31b8efc1 100644 --- a/src/components/templates/ErrorPages/Maintenance/Maintenance.tsx +++ b/src/components/templates/ErrorPages/Maintenance/Maintenance.tsx @@ -13,7 +13,7 @@ import { HelpLine, HelpLineDetails } from '../../../molecules/Help/Help'; import { ErrorTemplateProps } from '../types'; import { StyledIcon } from '../styles'; -interface MaintenanceFiveHundredErrorProps extends ErrorTemplateProps { +export interface MaintenanceFiveHundredErrorProps extends ErrorTemplateProps { helpLine?: HelpLine; } diff --git a/src/components/templates/ErrorPages/index.tsx b/src/components/templates/ErrorPages/index.tsx index 0312df771..d29947270 100644 --- a/src/components/templates/ErrorPages/index.tsx +++ b/src/components/templates/ErrorPages/index.tsx @@ -5,17 +5,14 @@ import Four0FourTemplate from './Four0Four/Four0Four'; import FiveHundredTemplate from './FiveHundred/FiveHundred'; import MaintenanceTemplate from './Maintenance/Maintenance'; -interface ErrorTemplateStatic { +interface ErrorTemplateProps { children: React.ReactNode; - Four0Four: typeof Four0FourTemplate; - FiveHundred: typeof FiveHundredTemplate; - Maintenance: typeof MaintenanceTemplate; } -const ErrorTemplate = ({ children }: ErrorTemplateStatic) => {children}; +const ErrorTemplate = ({ children }: ErrorTemplateProps) => {children}; -ErrorTemplate.Four0Four = Four0FourTemplate; -ErrorTemplate.FiveHundred = FiveHundredTemplate; -ErrorTemplate.Maintenance = MaintenanceTemplate; - -export default ErrorTemplate; +export default Object.assign(ErrorTemplate, { + Four0Four: Four0FourTemplate, + FiveHundred: FiveHundredTemplate, + Maintenance: MaintenanceTemplate, +}); diff --git a/tsconfig.types.json b/tsconfig.types.json index 75896792e..8fddaca77 100644 --- a/tsconfig.types.json +++ b/tsconfig.types.json @@ -19,7 +19,6 @@ "incremental": true, "assumeChangesOnlyAffectDirectDependencies": true }, - "include": ["src/**/*"], "exclude": ["node_modules", "**/*.test.*"] }