mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
30 lines
939 B
TypeScript
30 lines
939 B
TypeScript
import MainContent from './MainContent';
|
|
import {DesignSystemApp, DesignSystemAppProps} from '@tryghost/admin-x-design-system';
|
|
import {FrameworkProvider, TopLevelFrameworkProps} from '@tryghost/admin-x-framework';
|
|
import {RoutingProvider} from '@tryghost/admin-x-framework/routing';
|
|
|
|
interface AppProps {
|
|
framework: TopLevelFrameworkProps;
|
|
designSystem: DesignSystemAppProps;
|
|
}
|
|
|
|
const modals = {
|
|
paths: {
|
|
'demo-modal': 'DemoModal'
|
|
},
|
|
load: async () => import('./components/modals')
|
|
};
|
|
|
|
const App: React.FC<AppProps> = ({framework, designSystem}) => {
|
|
return (
|
|
<FrameworkProvider {...framework}>
|
|
<RoutingProvider basePath='demo-x' modals={modals}>
|
|
<DesignSystemApp className='admin-x-demo' {...designSystem}>
|
|
<MainContent />
|
|
</DesignSystemApp>
|
|
</RoutingProvider>
|
|
</FrameworkProvider>
|
|
);
|
|
};
|
|
|
|
export default App;
|