diff --git a/apps/comments-ui/src/components/modals/GenericDialog.js b/apps/comments-ui/src/components/modals/GenericDialog.js new file mode 100644 index 0000000000..59c108b687 --- /dev/null +++ b/apps/comments-ui/src/components/modals/GenericDialog.js @@ -0,0 +1,33 @@ +import React from 'react'; +import {Transition} from '@headlessui/react'; + +const GenericDialog = (props) => { + return ( + +
+ +
+ {props.children} +
+
+
+
+ ); +}; + +export default GenericDialog; \ No newline at end of file diff --git a/apps/comments-ui/src/components/modals/NotAuthorContextMenu.js b/apps/comments-ui/src/components/modals/NotAuthorContextMenu.js index d5ff0d5223..8374083c6f 100644 --- a/apps/comments-ui/src/components/modals/NotAuthorContextMenu.js +++ b/apps/comments-ui/src/components/modals/NotAuthorContextMenu.js @@ -1,12 +1,19 @@ -import React, {useContext} from 'react'; -import AppContext from '../../AppContext'; +import React, {useState} from 'react'; +// import React, {useContext, useState} from 'react'; +import ReportDialog from './ReportDialog'; +// import AppContext from '../../AppContext'; const NotAuthorContextMenu = (props) => { - const {dispatchAction} = useContext(AppContext); + // const {dispatchAction} = useContext(AppContext); + let [isOpen, setIsOpen] = useState(false); const reportComment = (event) => { - dispatchAction('reportComment', props.comment); - props.close(); + // dispatchAction('reportComment', props.comment); + setIsOpen(true); + }; + + const closeModal = () => { + setIsOpen(false); }; return ( @@ -14,6 +21,7 @@ const NotAuthorContextMenu = (props) => { + ); }; diff --git a/apps/comments-ui/src/components/modals/ReportDialog.js b/apps/comments-ui/src/components/modals/ReportDialog.js new file mode 100644 index 0000000000..7dd09de5e9 --- /dev/null +++ b/apps/comments-ui/src/components/modals/ReportDialog.js @@ -0,0 +1,17 @@ +import React from 'react'; +import GenericDialog from './GenericDialog'; + +const ReportDialog = (props) => { + return ( + +

You sure you want to report?

+

You request will be sent to the owner of this site.

+
+ +

No,

+
+
+ ); +}; + +export default ReportDialog; \ No newline at end of file diff --git a/apps/comments-ui/tailwind.config.js b/apps/comments-ui/tailwind.config.js index 8e97c9a675..2de023e9ca 100644 --- a/apps/comments-ui/tailwind.config.js +++ b/apps/comments-ui/tailwind.config.js @@ -133,6 +133,14 @@ module.exports = { '0px 0px 1px rgba(0, 0, 0, 0.12)', '0px 13px 20px rgba(0, 0, 0, 0.04)', '0px 14px 57px rgba(0, 0, 0, 0.06)' + ], + modal: [ + '0 3.8px 2.2px rgba(0, 0, 0, 0.028)', + '0 9.2px 5.3px rgba(0, 0, 0, 0.04)', + '0 17.3px 10px rgba(0, 0, 0, 0.05)', + '0 30.8px 17.9px rgba(0, 0, 0, 0.06)', + '0 57.7px 33.4px rgba(0, 0, 0, 0.072)', + '0 138px 80px rgba(0, 0, 0, 0.1)' ] }, animation: {