-
Notifications
You must be signed in to change notification settings - Fork 3
/
projectcards
72 lines (67 loc) · 2.22 KB
/
projectcards
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import React, { useState } from "react";
import Card from "react-bootstrap/Card";
import Button from "react-bootstrap/Button";
import { CgWebsite } from "react-icons/cg";
function ProjectCards(props) {
const [depIata, setDepIata] = useState("");
const [arrIata, setArrIata] = useState("");
const handleSearch = () => {
// You can implement the logic to trigger the API call with the user inputs
console.log('Search button clicked with inputs:', depIata, arrIata);
// For now, just log the values to the console
};
return (
<Card className="project-card-view">
<Card.Body>
<Card.Title>{props.title}</Card.Title>
<Card.Text style={{ textAlign: "justify" }}>
{props.description}
</Card.Text>
<div>
<label>
Departure IATA code:
<input
type="text"
value={depIata}
onChange={(e) => setDepIata(e.target.value)}
/>
</label>
<label>
Arrival IATA code:
<input
type="text"
value={arrIata}
onChange={(e) => setArrIata(e.target.value)}
/>
</label>
<Button variant="primary" onClick={handleSearch}>
Search Flights
</Button>
</div>
</Card.Body>
{/* Include your custom HTML structure below */}
{/* Replace with your custom HTML structure */}
<div className="card mb-3">
<div className="row no-gutters">
<div className="col-md-4">
<img src="..." className="card-img" alt="..." />
</div>
<div className="col-md-8">
<div className="card-body">
<h5 className="card-title">Card title</h5>
<p className="card-text">
This is a wider card with supporting text below as a natural
lead-in to additional content. This content is a little bit
longer.
</p>
<p className="card-text">
<small className="text-muted">Last updated 3 mins ago</small>
</p>
</div>
</div>
</div>
</div>
</Card>
);
}
export default ProjectCards;