Non-existing button
This commit is contained in:
23
src/components/pages/Disruption.js
Normal file
23
src/components/pages/Disruption.js
Normal file
@ -0,0 +1,23 @@
|
||||
import addNotification from "react-push-notification";
|
||||
|
||||
const Disruption = () => {
|
||||
const buttonClick = () => {
|
||||
addNotification({
|
||||
title: "Warning",
|
||||
subtitle: "This is a subtitle",
|
||||
message: "This is a very long message",
|
||||
theme: "blue",
|
||||
native: true, // when using native, your OS will handle theming.
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="page">
|
||||
<button onClick={buttonClick} className="button">
|
||||
Störning
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Disruption;
|
@ -1,38 +1,49 @@
|
||||
import React, { Component } from 'react';
|
||||
import React, { Component } from "react";
|
||||
|
||||
import Header from '../Header.js';
|
||||
import TopMenu from '../TopMenu.js';
|
||||
import MainArea from '../MainArea.js';
|
||||
import StopTitle from '../StopTitle.js';
|
||||
import TrafficList from '../TrafficList.js';
|
||||
import Header from "../Header.js";
|
||||
import TopMenu from "../TopMenu.js";
|
||||
import MainArea from "../MainArea.js";
|
||||
import StopTitle from "../StopTitle.js";
|
||||
import TrafficList from "../TrafficList.js";
|
||||
|
||||
import Stop from '../../classes/Stop.js';
|
||||
import Departure from '../../classes/Departure.js';
|
||||
import Stop from "../../classes/Stop.js";
|
||||
import Departure from "../../classes/Departure.js";
|
||||
|
||||
import Disruption from "./Disruption.js";
|
||||
|
||||
class TrafficInfo extends Component {
|
||||
render() {
|
||||
let testStop =
|
||||
new Stop(
|
||||
"Lemmingsgatan",
|
||||
["Läge A", "Läge B", "Läge C"],
|
||||
[
|
||||
new Departure("519", "Mot Heden", "11:59", "Trafikolycka vid Partille Centrum."),
|
||||
new Departure("58", "Mot Västra Eriksberg", "12:07")
|
||||
],
|
||||
);
|
||||
render() {
|
||||
let testStop = new Stop(
|
||||
"Lemmingsgatan",
|
||||
["Läge A", "Läge B", "Läge C"],
|
||||
[
|
||||
new Departure(
|
||||
"519",
|
||||
"Mot Heden",
|
||||
"11:59",
|
||||
"Trafikolycka vid Partille Centrum."
|
||||
),
|
||||
new Departure("58", "Mot Västra Eriksberg", "12:07"),
|
||||
]
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Header title="Trafikinfo" />
|
||||
<TopMenu>
|
||||
<StopTitle stop={testStop} />
|
||||
</TopMenu>
|
||||
<MainArea>
|
||||
<TrafficList departures={testStop.departures} />
|
||||
</MainArea>
|
||||
</>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<Header title="Trafikinfo" />
|
||||
<TopMenu>
|
||||
<StopTitle stop={testStop} />
|
||||
</TopMenu>
|
||||
<MainArea>
|
||||
<TrafficList departures={testStop.departures} />
|
||||
</MainArea>
|
||||
<Disruption>
|
||||
<button onClick={Disruption} className="button">
|
||||
Störning
|
||||
</button>
|
||||
</Disruption>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TrafficInfo;
|
||||
export default TrafficInfo;
|
||||
|
Reference in New Issue
Block a user