-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#14 Add boilerplate and route to create post
- Loading branch information
1 parent
b36afc5
commit 4a94dba
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import React, { useState } from "react"; | ||
|
||
import Form from "react-bootstrap/Form"; | ||
import Button from "react-bootstrap/Button"; | ||
import Row from "react-bootstrap/Row"; | ||
import Col from "react-bootstrap/Col"; | ||
import Container from "react-bootstrap/Container"; | ||
|
||
import Upload from "../../assets/upload.png"; | ||
|
||
import styles from "../../styles/PostCreateEditForm.module.css"; | ||
import appStyles from "../../App.module.css"; | ||
import btnStyles from "../../styles/Button.module.css"; | ||
|
||
function PostCreateForm() { | ||
const [errors, setErrors] = useState({}); | ||
|
||
const textFields = ( | ||
<div className="text-center"> | ||
{/* Add your form fields here */} | ||
|
||
<Button | ||
className={`${btnStyles.Button} ${btnStyles.Blue}`} | ||
onClick={() => {}} | ||
> | ||
cancel | ||
</Button> | ||
<Button className={`${btnStyles.Button} ${btnStyles.Blue}`} type="submit"> | ||
create | ||
</Button> | ||
</div> | ||
); | ||
|
||
return ( | ||
<Form> | ||
<Row> | ||
<Col className="py-2 p-0 p-md-2" md={7} lg={8}> | ||
<Container | ||
className={`${appStyles.Content} ${styles.Container} d-flex flex-column justify-content-center`} | ||
> | ||
<Form.Group className="text-center"> | ||
<Form.Label | ||
className="d-flex justify-content-center" | ||
htmlFor="image-upload" | ||
> | ||
ASSET | ||
</Form.Label> | ||
</Form.Group> | ||
<div className="d-md-none">{textFields}</div> | ||
</Container> | ||
</Col> | ||
<Col md={5} lg={4} className="d-none d-md-block p-0 p-md-2"> | ||
<Container className={appStyles.Content}>{textFields}</Container> | ||
</Col> | ||
</Row> | ||
</Form> | ||
); | ||
} | ||
|
||
export default PostCreateForm; |