Styling
This commit is contained in:
@@ -2,6 +2,7 @@ import React, { useState, useEffect, useContext } from "react";
|
|||||||
import { LineChart, Line, CartesianGrid, XAxis, YAxis } from "recharts";
|
import { LineChart, Line, CartesianGrid, XAxis, YAxis } from "recharts";
|
||||||
import { format, addDays } from "date-fns";
|
import { format, addDays } from "date-fns";
|
||||||
import { Dashboard } from "@/components/main/routes/Dashboard";
|
import { Dashboard } from "@/components/main/routes/Dashboard";
|
||||||
|
import { Options } from "@/components/main/routes/Options";
|
||||||
import {
|
import {
|
||||||
loadStorageOrDefault,
|
loadStorageOrDefault,
|
||||||
persistStorage,
|
persistStorage,
|
||||||
@@ -62,7 +63,7 @@ const Navigation = function ({ router }) {
|
|||||||
|
|
||||||
const Base = function ({ children }) {
|
const Base = function ({ children }) {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col grow items-center justify-center h-full w-full bg-muted">
|
<div className="flex flex-col grow items-center justify-center h-full w-full bg-muted p-5">
|
||||||
<Navigation />
|
<Navigation />
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
@@ -92,8 +93,8 @@ const App: React.FC = () => {
|
|||||||
{
|
{
|
||||||
...routes.options,
|
...routes.options,
|
||||||
element: (
|
element: (
|
||||||
<Base id="Dashboard">
|
<Base id="Options">
|
||||||
<div>Hello world!</div>,
|
<Options state={state} updateState={updateState} />
|
||||||
</Base>
|
</Base>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -72,7 +72,10 @@ export const Dashboard = function ({ state, updateState }) {
|
|||||||
}, [state.dataCache, dateTime]);
|
}, [state.dataCache, dateTime]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex p-5 bg-white border border-solid border-slate-300 rounded-lg space-y-5">
|
<div
|
||||||
|
className="flex p-5 bg-white border border-solid border-slate-300 rounded-lg space-y-5 w-full h-full"
|
||||||
|
style={{ maxWidth: "810px", maxHeight: "470px" }}
|
||||||
|
>
|
||||||
<div>
|
<div>
|
||||||
<h1 className="text-lg font-medium mb-2">Forecast</h1>
|
<h1 className="text-lg font-medium mb-2">Forecast</h1>
|
||||||
<ForecastDatePicker dateTime={dateTime} onChange={setDateTime} />
|
<ForecastDatePicker dateTime={dateTime} onChange={setDateTime} />
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export const ForecastDatePicker = function ({
|
|||||||
onChange,
|
onChange,
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<label>
|
<label className="font-medium">
|
||||||
Forecast date (min. of 14 days in advance) <br />
|
Forecast date (min. of 14 days in advance) <br />
|
||||||
<input
|
<input
|
||||||
type="date"
|
type="date"
|
||||||
|
|||||||
Reference in New Issue
Block a user