diff --git a/components/doc/common/docactions.js b/components/doc/common/docactions.js
index 90b70a8773..0ce91b6723 100644
--- a/components/doc/common/docactions.js
+++ b/components/doc/common/docactions.js
@@ -2,12 +2,14 @@ import React, { useEffect, useContext } from 'react';
import { useRef } from 'react';
import { Button } from '../../lib/button/Button';
import { Menu } from '../../lib/menu/Menu';
+import { Toast } from '../../lib/toast/Toast';
import DomHandler from '../../lib/utils/DomHandler';
import { useLiveEditor } from './liveeditor';
import AppContentContext from '../../../components/layout/appcontentcontext';
export const DocActions = (props) => {
const menu = useRef(null);
+ const toast = useRef(null);
const liveEditor = useRef(null);
const context = useContext(AppContentContext);
@@ -20,19 +22,19 @@ export const DocActions = (props) => {
const items = [
{
label: 'Hooks Source Demo',
- command: () => liveEditor.current.postSandboxParameters('hooks')
+ command: () => liveEditor.current.postSandboxParameters('hooks', toast)
},
{
label: 'Class Source Demo',
- command: () => liveEditor.current.postSandboxParameters('class')
+ command: () => liveEditor.current.postSandboxParameters('class', toast)
},
{
label: 'TS Source Demo',
- command: () => liveEditor.current.postSandboxParameters('ts')
+ command: () => liveEditor.current.postSandboxParameters('ts', toast)
},
{
label: 'Browser Source Demo',
- command: () => liveEditor.current.postSandboxParameters('browser')
+ command: () => liveEditor.current.postSandboxParameters('browser', toast)
}
];
@@ -61,6 +63,8 @@ export const DocActions = (props) => {
}
return (
+ <>
+