remove unnecessary children in Interface
This commit is contained in:
@@ -8,7 +8,6 @@ import { GlobalStyles } from 'ts/globalStyles';
|
||||
|
||||
interface BaseProps {
|
||||
context: any;
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
const Base: React.StatelessComponent<BaseProps> = props => (
|
||||
|
||||
@@ -12,7 +12,6 @@ const isTouch = Boolean(
|
||||
);
|
||||
|
||||
interface CodeProps {
|
||||
children: React.ReactNode;
|
||||
language?: string;
|
||||
isLight?: boolean;
|
||||
isDiff?: boolean;
|
||||
|
||||
@@ -23,7 +23,6 @@ const StyledMain =
|
||||
|
||||
interface MainProps {
|
||||
dark?: boolean;
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
const Content: React.StatelessComponent<MainProps> = props => (
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -36,7 +36,6 @@ const StyledItem = styled.li`
|
||||
|
||||
interface ListProps {
|
||||
items?: [];
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
const List: React.StatelessComponent<ListProps> = props => (
|
||||
|
||||
@@ -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>;
|
||||
|
||||
Reference in New Issue
Block a user