@@ -50,9 +50,10 @@ const flattenLinks = (children: ReactNode): ReactNode[] =>
5050 return acc
5151 } , [ ] )
5252
53- const Overlay : FunctionComponent < {
53+ interface OverlayProps {
5454 onClick ?: EventHandler < MouseEvent < HTMLDivElement > >
55- } > = ( { onClick } ) => (
55+ }
56+ const Overlay = ( { onClick } : OverlayProps ) => (
5657 < React . Fragment >
5758 < div
5859 onClick = { onClick }
@@ -80,7 +81,7 @@ export const Sidenav = forwardRef<
8081 open ?: boolean
8182 components ?: MDXProviderComponents
8283 styles ?: ThemeStyles
83- children : ReactNode
84+ children ? : ReactNode
8485 }
8586> ( ( { open, styles = { } , components = { } , ...props } , ref ) => {
8687 return (
@@ -112,7 +113,7 @@ export const Sidenav = forwardRef<
112113 ) ,
113114 } }
114115 >
115- { open && < Overlay { ... props } /> }
116+ { open && < Overlay /> }
116117 < MDXProvider components = { components } >
117118 < div
118119 { ...props }
@@ -198,7 +199,11 @@ const NavLinks: FunctionComponent<{
198199 pathname : string
199200 links : ReactComponentElement < 'a' > [ ]
200201 href : string
201- Link : React . FunctionComponent < { href ?: string ; className ?: string } >
202+ Link : React . FunctionComponent < {
203+ href ?: string
204+ className ?: string
205+ children ?: ReactNode
206+ } >
202207} > = ( { open, pathname = '' , links, href, Link } ) => {
203208 if ( ! links ) return null
204209 if ( ! open && ! pathname . includes ( href ) ) return null
@@ -325,12 +330,22 @@ export const AccordionNav = forwardRef<
325330const removeSlash = ( str : string ) =>
326331 str . length > 1 ? str . replace ( / \/ $ / , '' ) : str
327332
328- const PaginationLink : FunctionComponent < {
333+ interface PaginationLinkProps {
329334 label : string
330335 mdxType : string
331336 originalType : string
332337 parentName : string
333- } > = ( { label, children, mdxType, originalType, parentName, ...props } ) => (
338+ children : ReactNode
339+ }
340+
341+ const PaginationLink = ( {
342+ label,
343+ children,
344+ mdxType,
345+ originalType,
346+ parentName,
347+ ...props
348+ } : PaginationLinkProps ) => (
334349 < a
335350 { ...props }
336351 sx = { {
@@ -351,10 +366,18 @@ const PaginationLink: FunctionComponent<{
351366 </ a >
352367)
353368
354- export const Pagination : FunctionComponent < {
369+ export interface PaginationProps {
355370 pathname : string
356371 components ?: any
357- } > = ( { pathname = '' , children, components, ...props } ) => {
372+ children ?: ReactNode
373+ }
374+
375+ export const Pagination = ( {
376+ pathname = '' ,
377+ children,
378+ components,
379+ ...props
380+ } : PaginationProps ) => {
358381 const links = flattenLinks ( children )
359382 const index = links . findIndex (
360383 ( link ) =>
0 commit comments