From 269d00bb3a025bb6a905b22d4f1248103669bebe Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 5 Aug 2024 23:32:00 +0530 Subject: [PATCH] chore: delete script.tsx --- .../molecules/action-settings/script.tsx | 63 ------------------- 1 file changed, 63 deletions(-) delete mode 100644 src/components/molecules/action-settings/script.tsx diff --git a/src/components/molecules/action-settings/script.tsx b/src/components/molecules/action-settings/script.tsx deleted file mode 100644 index 2cece263..00000000 --- a/src/components/molecules/action-settings/script.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import React, { forwardRef, useImperativeHandle } from 'react'; -import Editor from 'react-simple-code-editor'; -// @ts-ignore -import { highlight, languages } from 'prismjs/components/prism-core'; -import 'prismjs/components/prism-clike'; -import 'prismjs/components/prism-javascript'; -import 'prismjs/themes/prism.css'; -import styled from "styled-components"; -import InfoIcon from '@mui/icons-material/Info'; -import { WarningText } from "../../atoms/texts"; - -export const ScriptSettings = forwardRef((props, ref) => { - const [code, setCode] = React.useState(''); - - useImperativeHandle(ref, () => ({ - getSettings() { - return code; - } - })); - - return ( - - - - Allows to run an arbitrary asynchronous function evaluated at the server - side accepting the current page instance argument. - - setCode(code)} - highlight={code => highlight(code, languages.js)} - padding={10} - style={{ - fontFamily: '"Fira code", "Fira Mono", monospace', - fontSize: 12, - background: '#f0f0f0', - }} - /> - - ); -}); - -const EditorWrapper = styled.div` - flex: 1; - overflow: auto; - /** hard-coded height */ - height: 100%; - width: 100%; -`; - -const StyledEditor = styled(Editor)` - white-space: pre; - caret-color: #fff; - min-width: 100%; - min-height: 100%; - float: left; - & > textarea, - & > pre { - outline: none; - white-space: pre !important; - } -`;