Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added_form #26

Merged
merged 1 commit into from
Apr 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions client/src/Components/MainContent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
import React from "react";
// import { useState } from "react";
import Button from "react-bootstrap/Button";
import { Card, Form, Col, Container, Row } from "react-bootstrap";

const MainContent = () => {
// const [val, setVal] = useState("");
return (
<Container style={{ marginTop: "6%" }}>
<Row>
<Col>
<Card>
<Card.Body>
<Form>
<Form.Group controlId="exampleForm.ControlTextarea1">
{/* <Form.Label>Textarea 1</Form.Label> */}
<Form.Control
as="textarea"
rows={10}
placeholder="write your message here"
/>
</Form.Group>
<Row
lg={2}
xl={2}
className="ms-auto"
style={{ marginTop: "3%", marginRight: "1%" }}
>
<Button
variant="danger"
className="ms-auto"
style={{ width: "100px" }}
>
CLEAR
</Button>
<Button
variant="danger"
style={{ width: "100px", marginLeft: "2%" }}
>
CHECK
</Button>
</Row>
</Form>
</Card.Body>
</Card>
</Col>
<Col>
<Card>
<Card.Body>
<Form>
<Form.Group controlId="exampleForm.ControlTextarea2">
{/* <Form.Label>Textarea 2</Form.Label> */}
<Form.Control as="textarea" rows={10} />
</Form.Group>
<Row
lg={1}
xl={1}
className="ms-auto"
style={{ marginTop: "3%", marginRight: "1%" }}
>
<Button
variant="danger"
className="ms-auto"
style={{ width: "100px" }}
>
SAVE
</Button>
<Button
variant="danger"
style={{ width: "100px", marginLeft: "2%" }}
>
COPY
</Button>
</Row>
</Form>
</Card.Body>
</Card>
</Col>
</Row>
</Container>
);
};

export default MainContent;

{
/* <p>Hello World</p>
<label htmlFor="review">Review</label>
<textarea
value={val}
onChange={(e) => setVal(e.target.value)}
spellCheck={true}
id="review"
name="review"
placeholder="write your message here"
rows="10"
cols="50"
></textarea>
<Button variant="primary">BootstrapButton</Button> */
}
16 changes: 9 additions & 7 deletions client/src/pages/Home.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
//import { useEffect, useState } from "react";
import { useState } from "react";
// import { useState } from "react";
//import { Link } from "react-router-dom";
import Header from "../Components/Header";
import Footer from "../Components/Footer";
import Button from "react-bootstrap/Button";
import MainContent from "../Components/MainContent";
// import Button from "react-bootstrap/Button";

import "./Home.css";
// import logo from "./logo.svg";

export function Home() {
const [val, setVal] = useState("");
// const [val, setVal] = useState("");
/*const [message, setMessage] = useState("Loading...");

useEffect(() => {
Expand All @@ -31,11 +32,11 @@ export function Home() {
return (
<div>
<Header />
<p>Hello World</p>
{/* <p>Hello World</p> */}
{/* this the label */}
<label htmlFor="review">Review</label>
{/* <label htmlFor="review">Review</label> */}
{/*textarea with spellcheck function*/}
<textarea
{/* <textarea
value={val}
onChange={(e) => setVal(e.target.value)}
spellCheck={true}
Expand All @@ -45,7 +46,8 @@ export function Home() {
rows="10"
cols="50"
></textarea>
<Button variant="primary">BootstrapButton</Button>
<Button variant="primary">BootstrapButton</Button> */}
<MainContent />

<Footer />
</div>
Expand Down