diff --git a/components/FormContainer.js b/components/FormContainer.js index 38b1c96..e286bad 100644 --- a/components/FormContainer.js +++ b/components/FormContainer.js @@ -1,9 +1,11 @@ import React, { useState } from 'react'; import FormField from './FormField'; +import FormPreview from './FormPreview'; export default function FormContainer() { const [formContent, setFormContent] = useState([]); const [option, setOption] = useState(""); + const [showPreview, setShowPreview] = useState(false); const addFormField = () => { const field = { @@ -64,31 +66,55 @@ export default function FormContainer() { setFormContent(formField); } + const togglePreview = () => { + setShowPreview(!showPreview); + }; + return ( -