diff --git a/src/components/Container/index.tsx b/src/components/Container/index.tsx index c209636..aef577a 100644 --- a/src/components/Container/index.tsx +++ b/src/components/Container/index.tsx @@ -1,11 +1,7 @@ -import React from "react" +import React, { PropsWithChildren} from "react" import * as SC from "./styles" -interface ContainerProps { - children: React.ReactNode -} - -const Container = ({ children, ...restProps }: ContainerProps): JSX.Element => ( +const Container = ({ children, ...restProps }: PropsWithChildren<{}>): JSX.Element => ( {children} ) diff --git a/src/components/DocsSidebarSection/index.tsx b/src/components/DocsSidebarSection/index.tsx index 9f7b12b..c99975c 100644 --- a/src/components/DocsSidebarSection/index.tsx +++ b/src/components/DocsSidebarSection/index.tsx @@ -1,4 +1,4 @@ -import React from "react" +import React, { PropsWithChildren } from "react" import * as SC from "./styles" export interface DocsSidebarSectionProps { @@ -8,7 +8,7 @@ export interface DocsSidebarSectionProps { const DocsSidebarSection = ({ title, children, -}: React.PropsWithChildren) => { +}: PropsWithChildren) => { return (
{title} diff --git a/src/components/Sidebar/index.tsx b/src/components/Sidebar/index.tsx index c0d3c9a..9f5099a 100644 --- a/src/components/Sidebar/index.tsx +++ b/src/components/Sidebar/index.tsx @@ -1,9 +1,9 @@ -import React from "react" +import React, { PropsWithChildren } from "react" import logo from "../../images/tph-logo.png" import * as SC from "./styles" import ArrowRight from "../../icons/arrow-right.svg" -function MenuItem({ children, to }: { children: React.ReactNode; to: string }) { +function MenuItem({ children, to }: PropsWithChildren<{ to: string }>) { return ( {children}