diff --git a/src/App.css b/src/App.css new file mode 100644 index 0000000..d4a6eef --- /dev/null +++ b/src/App.css @@ -0,0 +1,11 @@ + + +@import url('https://fonts.googleapis.com/css?family=Josefin+Sans'); + +body { + font-family: 'Inter'; +} + +:root { + font-family: 'Inter'; +} \ No newline at end of file diff --git a/src/App.js b/src/App.js new file mode 100644 index 0000000..b4c3fb9 --- /dev/null +++ b/src/App.js @@ -0,0 +1,239 @@ +import React from 'react'; +import { css } from "emotion"; +import { useState } from 'react'; +import './App.css'; + + +const wrapper = css` +display: flex; +width:100%; + +`; +const leftpane = css` +width:50% + +`; + +const input1 = css` + + +`; + +const imageupload = css` + + +`; + +const textarea1 = css` + + +`; + +const fieldarea = css` + + +`; + +const buttontextarea = css` + +`; + +const rightpane = css` +padding-left:20px; +width:50%; + +`; + +const imageright = css` + width: 100%; + height:600px; + overflow: hidden; + +`; + +const imageright1 = css` + width: 100%; + height:600px; + overflow: hidden; + +`; + +const image = css` + width: 100%; + + +`; + +const titleinput0 = css` + + +`; + +const textarearight0 = css` + + +`; + + +const titleinput = css` + + +`; + +const textarearight = css` + + +`; + +function App() { + const [file, setFile] = React.useState(null); + const [fields, setFields] = useState([{ value: null }]); + const [input, setInput] = useState(""); + const [textarea, setTextarea] = useState(""); + const [fields1, setFields1] = useState([{ value: null }]); + const [selectb, setSelectb] = useState('InputField'); + + const addFields = e =>{ + const values = [...fields]; + values.push({ value: null, type:selectb }); + setFields(values); + }; + + const handleRemove = i => { + const values = [...fields]; + values.splice(i, 1); + setFields(values); + }; + + const updateInputChanged = idx => e => { + + + let newArr = [...fields]; + newArr[idx].value = e.target.value; + + setFields(newArr); +}; + + const updateFieldChanged = idx => e => { + + + let newArr = [...fields1]; + newArr[idx].value = e.target.value; + + setFields1(newArr); +}; + + function handleChange(e) { + setSelectb(e.target.value); + } + + + return ( + +
+ +
+ +
+ + setInput(e.target.value)} name="title"/> +


+
+ setFile(e.target.files[0])} name="img" accept="image/*"/> +


+
+