update src/components/Accordion/AccordionDesign1/index.js and src/components/Code/index.js

master
mahdi 3 years ago
parent d693992591
commit 421ef0a9ea
  1. 19
      src/components/Accordion/AccordionDesign1/index.js
  2. 2
      src/components/Code/index.js

@ -18,6 +18,7 @@ const AccordionDesign1 = ({ courses, vod }) => {
} }
return ( return (
<>
<DragDropContext onDragEnd={handleOnDragEnd}> <DragDropContext onDragEnd={handleOnDragEnd}>
<Droppable droppableId="accordions"> <Droppable droppableId="accordions">
{(provided) => ( {(provided) => (
@ -147,6 +148,7 @@ const AccordionDesign1 = ({ courses, vod }) => {
)} )}
</Droppable> </Droppable>
</DragDropContext> </DragDropContext>
</>
); );
}; };
@ -209,3 +211,20 @@ AccordionDesign1.defaultProps = {
}, },
], ],
}; };
{
/* monaco */
}
// import MonacoEditor from "react-monaco-editor";
// <MonacoEditor
// width="800"
// height="600"
// language="javascript"
// theme="vs-dark"
// value={code}
// options={options}
// onChange={::this.onChange}
// editorDidMount={::this.editorDidMount}
// />

@ -1,5 +1,6 @@
import { useState } from "react"; import { useState } from "react";
import copyIcon from "./copy.png"; import copyIcon from "./copy.png";
import MonacoEditor from "react-monaco-editor";
function Code({ code }) { function Code({ code }) {
const [copied, setCopied] = useState(false); const [copied, setCopied] = useState(false);
@ -13,6 +14,7 @@ function Code({ code }) {
/* Copy the text inside the text field */ /* Copy the text inside the text field */
navigator.clipboard.writeText(copyText); navigator.clipboard.writeText(copyText);
}; };
return ( return (
<div className="flex flex-col w-full my-10"> <div className="flex flex-col w-full my-10">
<div className="w-full flex flex-row items-center justify-between"> <div className="w-full flex flex-row items-center justify-between">

Loading…
Cancel
Save