diff --git a/src/components/Calendar/appointments.ts b/src/components/Calendar/appointments.ts
index e6cf0dd..44a2562 100644
--- a/src/components/Calendar/appointments.ts
+++ b/src/components/Calendar/appointments.ts
@@ -20,4 +20,11 @@ export const appointments = [
id: 0,
location: 'Room 1',
},
+ {
+ title: 'Twoja stara beszamel',
+ startDate: new Date(2020, 5, 1, 18, 45),
+ endDate: new Date(2020, 5, 1, 20, 0),
+ id: 0,
+ location: 'Room 1',
+ },
];
diff --git a/src/components/Calendar/index.tsx b/src/components/Calendar/index.tsx
index 11d617b..33d3ba3 100644
--- a/src/components/Calendar/index.tsx
+++ b/src/components/Calendar/index.tsx
@@ -12,13 +12,13 @@ import "moment/locale/pl";
import "./index.scss";
import { makeStyles, Theme, createStyles } from "@material-ui/core/styles";
-
interface CalendarProps {
data: Array
;
-
}
-interface CalendarState {currentDate: Date;}
+interface CalendarState {
+ currentDate: Date;
+}
const formatDayScaleDate = (
date: moment.MomentInput,
@@ -106,23 +106,22 @@ export default class Calendar extends React.PureComponent<
render() {
const { data } = this.props;
const { currentDate } = this.state;
-
return (
-
-
-
-
-
-
+
+
+
+
+
+
);
}
}
diff --git a/src/components/TopBar/PL.png b/src/components/TopBar/PL.png
new file mode 100644
index 0000000..656d382
Binary files /dev/null and b/src/components/TopBar/PL.png differ
diff --git a/src/components/TopBar/index.scss b/src/components/TopBar/index.scss
index 714d679..e0ae02a 100644
--- a/src/components/TopBar/index.scss
+++ b/src/components/TopBar/index.scss
@@ -47,6 +47,9 @@
flex-grow: 1.5;
}
}
+ &__menu{
+margin-top: 25px;
+ }
}
@media only screen and (max-width: 670px) {
.top-bar {
diff --git a/src/components/TopBar/index.tsx b/src/components/TopBar/index.tsx
index e276c28..7d6303b 100644
--- a/src/components/TopBar/index.tsx
+++ b/src/components/TopBar/index.tsx
@@ -4,47 +4,64 @@ import Input from "@material-ui/core/Input";
import Transfer from "./transfer.png";
import Search from "./search.svg";
import UK from "./UK.png";
+import PL from "./PL.png";
import User from "./user.png";
import CloseIcon from "./close.svg";
+import Menu from "@material-ui/core/Menu";
+import MenuItem from "@material-ui/core/MenuItem";
interface TopBarProps {
handleTransfer: (e: React.MouseEvent) => void;
- handleProfile: (e: React.MouseEvent) => void;
- handleLanguage: (e: React.MouseEvent) => void;
+ onLangChange: (lang:boolean) => void;
textChangeHandler: (e: React.ChangeEvent) => void;
- isOpen: boolean;
}
-interface TopBarState {}
+interface TopBarState {
+ isOpenProfile: boolean;
+ anchorEl: null | HTMLElement;
+ isPolish: boolean;
+}
export default class TopBar extends React.Component {
constructor(props: TopBarProps) {
super(props);
this.handleProfile = this.handleProfile.bind(this);
- this.handleLanguage = this.handleLanguage.bind(this);
+ this.handleClose = this.handleClose.bind(this);
+ this.onLangChange = this.onLangChange.bind(this);
this.handleTransfer = this.handleTransfer.bind(this);
this.state = {
- isOpen: false,
+ isOpenProfile: false,
+ anchorEl:null,
+ isPolish:true,
};
}
- handleTransfer(e: React.MouseEvent) {
- this.props.handleTransfer(e);
- this.setState({
- isOpen: true,
- });
- }
-
handleChange(e: React.ChangeEvent) {
this.props.textChangeHandler(e);
}
- handleProfile(e: React.MouseEvent) {
- this.props.handleProfile(e);
+ handleTransfer(e: React.MouseEvent) {
+ this.props.handleTransfer(e);
}
- handleLanguage(e: React.MouseEvent) {
- this.props.handleLanguage(e);
+ onLangChange(e: React.MouseEvent) {
+ this.setState({
+ isPolish:!this.state.isPolish,
+ })
+ this.props.onLangChange(this.state.isPolish);
+ }
+
+ handleProfile(e: React.MouseEvent) {
+ this.setState({
+ isOpenProfile: !this.state.isOpenProfile,
+ anchorEl:e.currentTarget as HTMLElement,
+ });
+ }
+
+ handleClose(e: React.MouseEvent) {
+ this.setState({
+ isOpenProfile: !this.state.isOpenProfile,
+ });
}
render() {
@@ -59,11 +76,7 @@ export default class TopBar extends React.Component {
plan na plan