on fe527da help sign in
bridge/src/components/Footer.js
17 lines 387 B history raw
1import React, { Children } from 'react';
2import { createPortal } from 'react-dom';
4const kFooterPortalId = 'footer-portal';
6function Footer({ children }) {
7 return createPortal(
8 Children.only(children),
9 document.getElementById(kFooterPortalId)
10 );
13Footer.Portal = function FooterPortal(props) {
14 return <div {...props} id={kFooterPortalId} />;
15};
17export default Footer;