|
@@ -7,22 +7,24 @@ import Reveal from 'reveal.js';
|
|
|
import * as hrSplitter from '../services/renderer/hr-splitter';
|
|
import * as hrSplitter from '../services/renderer/hr-splitter';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+import 'reveal.js/dist/reveal.css';
|
|
|
|
|
+import 'reveal.js/dist/theme/black.css';
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
type Props = {
|
|
type Props = {
|
|
|
rendererOptions: ReactMarkdownOptions,
|
|
rendererOptions: ReactMarkdownOptions,
|
|
|
|
|
+ revealOptions?: Reveal.Options,
|
|
|
children?: string,
|
|
children?: string,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
export const Presentation = (props: Props): JSX.Element => {
|
|
export const Presentation = (props: Props): JSX.Element => {
|
|
|
- const { rendererOptions, children } = props;
|
|
|
|
|
|
|
+ const { rendererOptions, revealOptions, children } = props;
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
|
if (children != null) {
|
|
if (children != null) {
|
|
|
- Reveal.initialize({
|
|
|
|
|
- hash: true,
|
|
|
|
|
- pageNumber: true,
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ Reveal.initialize(revealOptions);
|
|
|
}
|
|
}
|
|
|
- }, [children]);
|
|
|
|
|
|
|
+ }, [children, revealOptions]);
|
|
|
|
|
|
|
|
rendererOptions.remarkPlugins?.push(hrSplitter.remarkPlugin);
|
|
rendererOptions.remarkPlugins?.push(hrSplitter.remarkPlugin);
|
|
|
|
|
|