2023-11-08 12:33:18 +00:00
|
|
|
import clsx from 'clsx';
|
|
|
|
import React from 'react';
|
|
|
|
import {FetchKoenigLexical} from './global/form/HtmlEditor';
|
|
|
|
import DesignSystemProvider from './providers/DesignSystemProvider';
|
|
|
|
|
|
|
|
export interface DesignSystemAppProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
|
darkMode: boolean;
|
|
|
|
fetchKoenigLexical: FetchKoenigLexical;
|
|
|
|
}
|
|
|
|
|
|
|
|
const DesignSystemApp: React.FC<DesignSystemAppProps> = ({darkMode, fetchKoenigLexical, className, children, ...props}) => {
|
|
|
|
const appClassName = clsx(
|
|
|
|
'admin-x-base',
|
|
|
|
darkMode && 'dark',
|
|
|
|
className
|
|
|
|
);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className={appClassName} {...props}>
|
2024-07-30 09:18:51 -05:00
|
|
|
<DesignSystemProvider darkMode={darkMode} fetchKoenigLexical={fetchKoenigLexical}>
|
2023-11-08 12:33:18 +00:00
|
|
|
{children}
|
|
|
|
</DesignSystemProvider>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default DesignSystemApp;
|