This is just a technology testing project based on Create React App and TailwindCSS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
658B

  1. import React, { useEffect } from 'react'
  2. import PropTypes from 'prop-types'
  3. import ReactJson from 'react-json-view'
  4. export function SubmitFormResult(props) {
  5. const { setPopupTitle, data } = props
  6. useEffect(() => {
  7. if (setPopupTitle) { setPopupTitle('Data submitted from the form') }
  8. })
  9. return (
  10. <>
  11. <div className="overflow-y-auto max-h-screen-75 p-3 text-xl">
  12. <ReactJson name="formData" src={data} enableClipboard={false} />
  13. </div>
  14. </>
  15. )
  16. }
  17. SubmitFormResult.propTypes = {
  18. setPopupTitle: PropTypes.func,
  19. data: PropTypes.object,
  20. }
  21. export default SubmitFormResult