remove unnecessary children in Interface

This commit is contained in:
August Skare
2018-11-19 09:47:34 +01:00
parent 0b46f44ad3
commit 6e1014a647
7 changed files with 4 additions and 22 deletions

View File

@@ -8,7 +8,6 @@ import { GlobalStyles } from 'ts/globalStyles';
interface BaseProps {
context: any;
children: React.ReactNode;
}
const Base: React.StatelessComponent<BaseProps> = props => (

View File

@@ -12,7 +12,6 @@ const isTouch = Boolean(
);
interface CodeProps {
children: React.ReactNode;
language?: string;
isLight?: boolean;
isDiff?: boolean;

View File

@@ -23,7 +23,6 @@ const StyledMain =
interface MainProps {
dark?: boolean;
children: React.ReactNode;
}
const Content: React.StatelessComponent<MainProps> = props => (

View File

@@ -7,11 +7,7 @@ import { media } from 'ts/variables';
import { Button } from './Button';
import { Beta } from './Typography';
interface HeroProps extends ContextInterface {
children: React.ReactNode;
}
const Hero: React.StatelessComponent<HeroProps> = ({ children }) => (
const Hero: React.StatelessComponent<ContextInterface> = ({ children }) => (
<ThemeContext.Consumer>
{({ subtitle, tagline }: ContextInterface) => (
<StyledHero>

View File

@@ -44,13 +44,8 @@ const StyledIntroAside = styled.div`
`};
`;
interface IntroProps {
children?: React.ReactNode;
}
interface IntroLeadProps {
title: string;
children?: React.ReactNode;
}
const IntroLead: React.StatelessComponent<IntroLeadProps> = props => (
@@ -60,13 +55,13 @@ const IntroLead: React.StatelessComponent<IntroLeadProps> = props => (
</StyledIntroLead>
);
const IntroAside: React.StatelessComponent<IntroProps> = props => (
const IntroAside: React.StatelessComponent<{}> = props => (
<Breakout>
<StyledIntroAside>{props.children}</StyledIntroAside>
</Breakout>
);
const Intro: React.StatelessComponent<IntroProps> = props => (
const Intro: React.StatelessComponent<{}> = props => (
<Container wide={true}>
<Main>{props.children}</Main>
</Container>

View File

@@ -36,7 +36,6 @@ const StyledItem = styled.li`
interface ListProps {
items?: [];
children?: React.ReactNode;
}
const List: React.StatelessComponent<ListProps> = props => (

View File

@@ -46,11 +46,7 @@ const Root =
}
`;
interface TabsProps {
children: React.ReactNode;
}
const Tabs: React.StatelessComponent<TabsProps> = props => (
const Tabs: React.StatelessComponent<{}> = props => (
<Breakout>
<Root>
<ReactTabs>
@@ -69,7 +65,6 @@ const Tabs: React.StatelessComponent<TabsProps> = props => (
interface TabBlockProps {
title: string;
children: React.ReactNode;
}
const TabBlock: React.StatelessComponent<TabBlockProps> = props => <React.Fragment>{props.children}</React.Fragment>;