();
for (let i = 0; i < this.keys.length; i++) {
+ let input: JSX.Element | null;
+
if (this.dataTypes[i] == 'custom picker') {
console.log('noted!');
this.dataTypes[i] = 'text';
}
- output.push(
-
-
- this.update(e, i)}
- value={this.state[i as keyof T] as string}>
-
-
- )
+ if (this.dataTypes[i] == 'QUILL') {
+ input = (
+
+
+ this.update(e, i)} />
+
+ )
+ } else {
+ input = (
+
+
+ this.update(e, i)}
+ value={this.state[i as keyof T] as string}>
+
+
+ )
+ }
+
+ output.push(input);
}
return output;
diff --git a/client/src/components/ui/Quill.tsx b/client/src/components/ui/Quill.tsx
new file mode 100644
index 0000000..ddba2d0
--- /dev/null
+++ b/client/src/components/ui/Quill.tsx
@@ -0,0 +1,22 @@
+import { ChangeEvent, FC, useEffect, useState } from "react"
+import ReactQuill from "react-quill"
+
+interface QuillParams {
+ id: string
+ onChange: (params?: any) => any
+ theme?: string
+}
+
+const Quill: FC = ({ id, onChange, theme = 'snow' }) => {
+ const [value, setValue] = useState('');
+
+ useEffect(() => {
+ onChange(value);
+ }, [value])
+
+ return (
+
+ )
+}
+
+export default Quill;
\ No newline at end of file
diff --git a/client/src/components/ui/index.ts b/client/src/components/ui/index.ts
index a456fd8..2fc977c 100644
--- a/client/src/components/ui/index.ts
+++ b/client/src/components/ui/index.ts
@@ -6,10 +6,11 @@ import Form from "./Form";
import Navbar from "./Navbar";
import Page from "./Page";
import Panel from "./Panel";
+import Quill from "./Quill";
import TextField from "./TextField";
import Tooltip from "./Tooltip";
import UserCard from "./UserCard";
export {
- Button, Card, Dropdown, Divider, Form, Navbar, Page, Panel, TextField, Tooltip, UserCard
+ Button, Card, Dropdown, Divider, Form, Navbar, Page, Panel, Quill, TextField, Tooltip, UserCard
}
\ No newline at end of file