// @flow import * as React from 'react'; import {useCollapsibleStack} from 'react-navigation-collapsible'; /** * Function used to manipulate Collapsible Hooks from a class. * * Usage : * * export withCollapsible(Component) * * replacing Component with the one you want to use. * This component will then receive the collapsibleStack prop. * * @param Component The component to use Collapsible with * @returns {React.ComponentType} */ export default function withCollapsible( // eslint-disable-next-line flowtype/no-weak-types Component: React.ComponentType, // eslint-disable-next-line flowtype/no-weak-types ): React$AbstractComponent { // eslint-disable-next-line flowtype/no-weak-types return React.forwardRef((props: any, ref: any): React.Node => { return ( ); }); }