/** * @license * Copyright Stbui All Rights Reserved. * https://github.com/stbui/prophet */ import React, { FunctionComponent, ComponentType } from 'react'; import { Switch, Route } from 'react-router-dom'; import CoreRouter from './CoreRouter'; export interface CoreUIProps { title?: string; dashboard?: ComponentType; layout: ComponentType; loginPage?: ComponentType; catchAll: ComponentType; menu?: ComponentType; brand?: ComponentType; customRoutes?: any[]; children?: any; } const CoreUI: FunctionComponent = ({ children, title = 'Stbui', dashboard, layout, loginPage, catchAll = () => null, menu, brand, customRoutes = [], }) => ( {loginPage ? ( React.createElement(loginPage, { ...props, title, }) } /> ) : null} ( {children} )} /> ); export default CoreUI;