Yuki Takei 3 лет назад
Родитель
Сommit
7d5b9d9842

+ 2 - 1
packages/app/src/components/PagePresentationModal.tsx

@@ -1,5 +1,6 @@
 import React from 'react';
 import React from 'react';
 
 
+import type { PresentationProps } from '@growi/presentation';
 import dynamic from 'next/dynamic';
 import dynamic from 'next/dynamic';
 import type { ReactMarkdownOptions } from 'react-markdown/lib/react-markdown';
 import type { ReactMarkdownOptions } from 'react-markdown/lib/react-markdown';
 import {
 import {
@@ -16,7 +17,7 @@ import { useNextThemes } from '~/stores/use-next-themes';
 import styles from './PagePresentationModal.module.scss';
 import styles from './PagePresentationModal.module.scss';
 
 
 
 
-const Presentation = dynamic(() => import('@growi/presentation').then(mod => mod.Presentation), {
+const Presentation = dynamic<PresentationProps>(() => import('@growi/presentation').then(mod => mod.Presentation), {
   ssr: false,
   ssr: false,
   loading: () => (
   loading: () => (
     <i className="fa fa-4x fa-spinner fa-pulse text-muted"></i>
     <i className="fa fa-4x fa-spinner fa-pulse text-muted"></i>

+ 2 - 2
packages/presentation/src/components/Presentation.tsx

@@ -17,12 +17,12 @@ const baseRevealOptions: Reveal.Options = {
   slideNumber: 'c/t',
   slideNumber: 'c/t',
 };
 };
 
 
-type Props = {
+export type PresentationProps = {
   options: PresentationOptions,
   options: PresentationOptions,
   children?: string,
   children?: string,
 }
 }
 
 
-export const Presentation = (props: Props): JSX.Element => {
+export const Presentation = (props: PresentationProps): JSX.Element => {
   const { options, children } = props;
   const { options, children } = props;
   const { revealOptions } = options;
   const { revealOptions } = options;