feat(notifications): Webhook Notifications (#632)

This commit is contained in:
sct
2021-01-12 18:28:42 +09:00
committed by GitHub
parent 1aa0005b42
commit a7cc7c5975
14 changed files with 928 additions and 191 deletions

View File

@@ -0,0 +1,35 @@
import React, { HTMLAttributes } from 'react';
import AceEditor from 'react-ace';
import 'ace-builds/src-noconflict/mode-json';
import 'ace-builds/src-noconflict/theme-dracula';
interface JSONEditorProps extends HTMLAttributes<HTMLDivElement> {
name: string;
value: string;
onUpdate: (value: string) => void;
}
const JSONEditor: React.FC<JSONEditorProps> = ({
name,
value,
onUpdate,
onBlur,
}) => {
return (
<div className="w-full overflow-hidden rounded-md">
<AceEditor
mode="json"
theme="dracula"
onChange={onUpdate}
name={name}
editorProps={{ $blockScrolling: true }}
value={value}
onBlur={onBlur}
height="300px"
width="100%"
/>
</div>
);
};
export default JSONEditor;