Skip to content

Commit 51a964d

Browse files
author
Marek
committed
Add frontend app
1 parent d57bf72 commit 51a964d

File tree

13 files changed

+11709
-1
lines changed

13 files changed

+11709
-1
lines changed

.idea/.gitignore

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/Project.xml

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
# aws-terraform-workshop-frontend
1+
# Basic Example
2+
3+
A simple [create-react-app](CRA-README.md) setup, showcasing one of the lastest React-Bootstrap components!

aws-terraform-workshop-frontend.iml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="WEB_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$" />
6+
<orderEntry type="inheritedJdk" />
7+
<orderEntry type="sourceFolder" forTests="false" />
8+
</component>
9+
</module>

public/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<title>React-Bootstrap CodeSandbox Starter</title>
7+
</head>
8+
<body>
9+
<noscript>You need to enable JavaScript to run this app.</noscript>
10+
<div id="root"></div>
11+
</body>
12+
</html>

src/App.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.header {
2+
text-align: center;
3+
}

src/App.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import React, {useState} from 'react';
2+
3+
import Toast from 'react-bootstrap/Toast';
4+
import Container from 'react-bootstrap/Container';
5+
import Button from 'react-bootstrap/Button';
6+
7+
import './App.css';
8+
9+
const ExampleToast = ({children}) => {
10+
const [show, toggleShow] = useState(true);
11+
12+
return (
13+
<>
14+
{!show && <Button onClick={() => toggleShow(true)}>Show Toast</Button>}
15+
<Toast show={show} onClose={() => toggleShow(false)}>
16+
<Toast.Header>
17+
<strong className="mr-auto">React-Bootstrap</strong>
18+
</Toast.Header>
19+
<Toast.Body>{children}</Toast.Body>
20+
</Toast>
21+
</>
22+
);
23+
};
24+
25+
const App = () => (
26+
<Container className="p-3">
27+
<Container className="p-5 mb-4 bg-light rounded-3">
28+
<h1 className="header">Welcome to AWS Terraform Workshop</h1>
29+
<ExampleToast>
30+
Message from backend: <span id="backend-response">Hello</span>
31+
</ExampleToast>
32+
</Container>
33+
</Container>
34+
);
35+
36+
export default App;

0 commit comments

Comments
 (0)