From 28b6869ad5c15e13ea3a5edc41e6862e1363e8c2 Mon Sep 17 00:00:00 2001 From: wrzesinski-hubert Date: Mon, 1 Jun 2020 16:26:58 +0200 Subject: [PATCH] topbar --- package-lock.json | 5 ++ package.json | 3 +- src/App.tsx | 6 +- src/components/TopBar/index.css | 105 ----------------------------- src/components/TopBar/index.scss | 50 ++++++++++++++ src/components/TopBar/index.tsx | 52 +++++++------- src/components/Transfer/index.scss | 16 +++++ src/components/Transfer/index.tsx | 62 +++++++++++++++++ 8 files changed, 163 insertions(+), 136 deletions(-) delete mode 100644 src/components/TopBar/index.css create mode 100644 src/components/TopBar/index.scss create mode 100644 src/components/Transfer/index.scss create mode 100644 src/components/Transfer/index.tsx diff --git a/package-lock.json b/package-lock.json index 0d99b06..3abcd01 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3133,6 +3133,11 @@ "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" }, + "bootstrap": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.5.0.tgz", + "integrity": "sha512-Z93QoXvodoVslA+PWNdk23Hze4RBYIkpb5h8I2HY2Tu2h7A0LpAgLcyrhrSUyo2/Oxm2l1fRZPs1e5hnxnliXA==" + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", diff --git a/package.json b/package.json index 30f3a4e..708ca87 100644 --- a/package.json +++ b/package.json @@ -42,5 +42,6 @@ "last 1 firefox version", "last 1 safari version" ] - } + }, + "optionalDependencies": {} } diff --git a/src/App.tsx b/src/App.tsx index 4bafcdb..59347cf 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,11 +1,13 @@ import React from "react"; -import TopBar from "./components/TopBar/index" +import TopBar from "./components/TopBar/" +import Transfer from "./components/Transfer/" import "./App.scss"; function App() { return (
- + +
); } diff --git a/src/components/TopBar/index.css b/src/components/TopBar/index.css deleted file mode 100644 index 065e0f1..0000000 --- a/src/components/TopBar/index.css +++ /dev/null @@ -1,105 +0,0 @@ -.bar { - background-color: #ffdc61; - height: 80px; - padding: 5px; - font-family: comic sans MS; - font-size: 24px; - font-weight: bold; - position: relative; -} - -.logo { - width: 80px; - height: 80px; - float: left; -} - -.rest { - margin-top: 20px; - overflow: hidden; -} - -.tekst { - width: 200px; - float: left; -} - -.iconSearch { - width: 35px; - float: left; -} - -.inputdiv { - width: 70%; - float: left; - transition: width 1s; -} - -.input { - width: 96%; - float: left; - transition: width 1s; -} - -@media only screen and (max-width: 1400px) { - .inputdiv { - width: 50%; - float: left; - } - - .input { - width: 76%; - float: left; - } -} - -@media only screen and (max-width: 870px) { - .tekst { - display: none; - } - .iconClose{ - display: none; - } - .iconUser { - width: 37px !important; - float: right; - } - - .transfer { - margin-left: 10px !important; - width: 37px !important; - float: right; - } - - .UK { - margin-left: 10px !important; - width: 35px !important; - float: right; - } -} - -.search { - overflow: hidden; -} - -.iconClose { - width: 35px; - float: left; -} - -.iconUser { - width: 47px; - float: right; -} - -.transfer { - margin-left: 25px; - width: 47px; - float: right; -} - -.UK { - margin-left: 25px; - width: 45px; - float: right; -} diff --git a/src/components/TopBar/index.scss b/src/components/TopBar/index.scss new file mode 100644 index 0000000..781334b --- /dev/null +++ b/src/components/TopBar/index.scss @@ -0,0 +1,50 @@ +.top-bar { + background-color: #ffdc61; + height: 80px; + padding: 5px; + font-family: comic sans MS; + font-size: 24px; + font-weight: bold; + display: flex; + justify-content: space-between; + + &__logo { + display: flex; + align-items: center; + flex-grow: 0.5; + justify-content: flex-start; + } + + &__logo-image { + width: 80px; + height: 80px; + } + + &__input-div { + width: 70%; + display: flex; + align-items: center; + flex-grow: 3; + } + + &__input-field { + width: 96%; + } + + &__icon-box { + display: flex; + align-items: center; + justify-content: space-around; + flex-grow: 1.5; + } + + &__icon { + width: 50px; + } +} + +@media only screen and (max-width: 870px) { + .top-bar__tekst { + display: none; + } +} diff --git a/src/components/TopBar/index.tsx b/src/components/TopBar/index.tsx index b2db0bf..8db8d74 100644 --- a/src/components/TopBar/index.tsx +++ b/src/components/TopBar/index.tsx @@ -1,5 +1,5 @@ import React from "react"; -import "./index.css"; +import "./index.scss"; import Input from "@material-ui/core/Input"; import SearchIcon from "@material-ui/icons/Search"; import CloseIcon from "@material-ui/icons/Close"; @@ -7,43 +7,39 @@ import CloseIcon from "@material-ui/icons/Close"; export default class TopBar extends React.Component { render() { return ( -
- logo -
-
plan na plan
-
-
- -
-
- -
- -
-
-
+
+
logo +
plan na plan
+
+
+ + + +
+
+ logo logo logo
diff --git a/src/components/Transfer/index.scss b/src/components/Transfer/index.scss new file mode 100644 index 0000000..a51aa27 --- /dev/null +++ b/src/components/Transfer/index.scss @@ -0,0 +1,16 @@ +.wrapper{ + display: flex; + justify-content: center; + text-align: center; + align-items: center; + height: 80vh; +} + +.transfer{ + display: flex; + width: 80%; + height: 70%; + background-color: purple; + align-items: center; + justify-content: center; +} \ No newline at end of file diff --git a/src/components/Transfer/index.tsx b/src/components/Transfer/index.tsx new file mode 100644 index 0000000..4b09c28 --- /dev/null +++ b/src/components/Transfer/index.tsx @@ -0,0 +1,62 @@ +import React from "react"; +import Modal from "@material-ui/core/Modal"; +import "./index.scss"; + +interface TransferProps { + names?: string; +} + +interface TransferState { + isOpen: boolean; +} + +export default class Transfer extends React.Component< + TransferProps, + TransferState +> { + constructor(props: TransferProps) { + super(props); + + this.handleOpen = this.handleOpen.bind(this); + this.handleClose = this.handleClose.bind(this); + this.state = { + isOpen: false, + }; + } + + handleOpen(e: React.MouseEvent) { + this.setState({ + isOpen: true, + }); + } + + handleClose(e: React.MouseEvent) { + this.setState({ + isOpen: false, + }); + } + + render() { + return ( +
+ + +
+ +
+ +
+
+ ); + } +}