import * as React from 'react' ; import { ComponentType } from 'react' ; import CoreAdminContext from './CoreAdminContext' ; import CoreAdminUI from './CoreAdminUI' ; import { AdminProps } from '../types' ; export type ChildrenFunction = ( ) => ComponentType [ ] ; example const CoreAdmin = ( props ) => { const { appLayout , authProvider , catchAll , children , customReducers , customRoutes = [ ] , customSagas , dashboard , dataProvider , disableTelemetry , history , i18nProvider , initialState , layout , loading , loginPage , logoutButton , menu , theme , title = 'React Admin' , } = props ; return ( < CoreAdminContext authProvider = { authProvider } dataProvider = { dataProvider } i18nProvider = { i18nProvider } history = { history } customReducers = { customReducers } customSagas = { customSagas } initialState = { initialState } > < CoreAdminUI layout = { appLayout || layout } customRoutes = { customRoutes } dashboard = { dashboard } disableTelemetry = { disableTelemetry } menu = { menu } catchAll = { catchAll } theme = { theme } title = { title } loading = { loading } loginPage = { loginPage } logout = { authProvider ? logoutButton : undefined } > { children } < /CoreAdminUI> < /CoreAdminContext>); } ; export default CoreAdmin ;