import React from 'react' import useTheme from '../use-theme' import FooterFoot from './footer-foot' import FooterGroup from './footer-group' import FooterLink from './footer-link' import { pickChild } from '../utils/collections' interface Props { className?: string } const defaultProps = { className: '' } type NativeAttrs = Omit, keyof Props> export type FooterProps = Props & typeof defaultProps & NativeAttrs const Footer: React.FC> = ({ children, className, ...props }) => { const theme = useTheme() const [withoutFooterChildren, footerChildren] = pickChild(children, FooterFoot) return (
{footerChildren}
) } type MemoPageComponent

= React.NamedExoticComponent

& { Group: typeof FooterGroup Foot: typeof FooterFoot Link: typeof FooterLink } type ComponentProps = Partial & Omit & NativeAttrs Footer.defaultProps = defaultProps export default React.memo(Footer) as MemoPageComponent