import React, { Suspense } from 'react';
import { Props } from './silke-code-editor';

const Code = React.lazy(() => import('./silke-code-editor'));

export function SilkeCodeEditor(props: Props) {
  return (
    <Suspense fallback={<div>Loading code editor...</div>}>
      <Code {...props} />
    </Suspense>
  );
}
