import { useShowController , ShowProps , ShowControllerProps , } from './useShowController' ; import { Translate } from '../../types' ; import { useTranslate } from '../../i18n' ; interface ShowControllerComponentProps extends ShowControllerProps { translate : Translate ; } interface Props extends ShowProps { children : ( params : ShowControllerComponentProps ) => JSX . Element ; } see useShowController example export const ShowController = ( { children , ... props } ) => { const controllerProps = useShowController ( props ) ; const translate = useTranslate ( ) ; return children ( { translate , ... controllerProps } ) ; } ;