UNPKG

@mskcc/carbon-react

Version:

Carbon react components for the MSKCC DSM

31 lines (30 loc) 1.15 kB
/** * MSKCC DSM 2021, 2023 */ import PropTypes from 'prop-types'; import React from 'react'; interface HeaderContainerRenderProps { isSideNavExpanded: boolean; onClickSideNavExpand: () => void; } interface HeaderContainerProps { isSideNavExpanded?: boolean; render: React.ComponentType<HeaderContainerRenderProps>; } declare function HeaderContainer({ render: Children, isSideNavExpanded, }: HeaderContainerProps): JSX.Element; declare namespace HeaderContainer { var propTypes: { /** * Optionally provide a custom class name that is applied to the underlying <header> */ isSideNavExpanded: PropTypes.Requireable<boolean>; /** * A function or component that is passed an object parameter with two * properties: `isSideNavExpanded` and `onClickSideNavExpand`. The function or * component can then use those properties to within the components it * returns, such as with the HeaderMenuButton and SideNav components. */ render: PropTypes.Validator<NonNullable<PropTypes.ReactComponentLike>>; }; } export default HeaderContainer;